本文整理汇总了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;
}