本文整理匯總了PHP中main::reload_config方法的典型用法代碼示例。如果您正苦於以下問題:PHP main::reload_config方法的具體用法?PHP main::reload_config怎麽用?PHP main::reload_config使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類main
的用法示例。
在下文中一共展示了main::reload_config方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: catch
$mining_pools->add_pool($pool['url'], $pool['user'], $pool['pass'], 'donate');
}
}
}
$don_pools = $mining_pools->get_pools('donate');
if (!empty($don_pools)) {
// Reset mining time to 0 so we begin after donating again checking for 24 hours.
$rig_config['mining_time'] = 0;
$rig_config['mining_last'] = '';
// Try to connect to default connection values.
try {
$rig_config['switch_back_group'] = $mining_pools->get_current_active_pool_group($main->get_rpc($rig));
if (empty($rig_config['switch_back_group'])) {
$rig_config['switch_back_group'] = 'default';
}
$main->reload_config();
// Switch to donating pool group.
$main->switch_pool_group('donate', $rig);
} catch (APIException $ex) {
}
}
}
} else {
if (!empty($rig_config['switch_back_group'])) {
// We are donating, count up the time.
// Only count up the time if cgminer is donating.
if ($is_cgminer_running) {
// Init donating time.
if (empty($rig_config['donation_time'])) {
$rig_config['donation_time'] = 0;
}