本文整理匯總了PHP中Lock::get_msg方法的典型用法代碼示例。如果您正苦於以下問題:PHP Lock::get_msg方法的具體用法?PHP Lock::get_msg怎麽用?PHP Lock::get_msg使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Lock
的用法示例。
在下文中一共展示了Lock::get_msg方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: set_time_limit
<?php
set_time_limit(0);
$start_time = time("now");
require_once 'lib/config.php';
require_once 'lib/ebay/selling.php';
require_once 'lib/item.php';
if (isset($_GET['user_id'])) {
$users = array(DB::query_row("SELECT * from ebay_users where `user_id`='{$_GET['user_id']}'"));
$lock_file = LOCK_FILE . '_' . $_GET['user_id'];
} else {
$users = DB::query_rows("SELECT * from ebay_users");
$lock_file = LOCK_FILE . '';
}
if (!Lock::lock($lock_file, "LOCK", 0 * 3600)) {
die('Another instance is already running: ' . Lock::get_msg($lock_file));
}
Log::push('----- Cron job started -----');
foreach ($users as $user) {
$user_id = $user['user_id'];
$DEVNAME = trim($user['dev_name']);
$APPNAME = trim($user['app_name']);
$CERTNAME = trim($user['cert_name']);
$paypal_email = trim($user['paypal_address']);
$token = decrypt($user['token']);
/* Relisting inactive items */
$items = EbaySelling::get_items('UnsoldList');
foreach ($items as $num => $ebay_item) {
if (!empty($_GET['num']) && $_GET['num'] != $num) {
continue;
}