|
@@ -108,7 +108,7 @@ function ratio_update(&$quit)
|
|
|
Log::record("ratio_update start calc quit =" . strbool($quit),Log::DEBUG);
|
|
|
Log::record("ratio_update start sleep",Log::DEBUG);
|
|
|
// Co::sleep(1);
|
|
|
- Swoole\Coroutine::sleep(1);
|
|
|
+ Swoole\Coroutine\System::sleep(1);
|
|
|
// sleep(1);
|
|
|
Log::record("ratio_update end sleep",Log::DEBUG);
|
|
|
|
|
@@ -144,6 +144,8 @@ for ($i = 0; $i < $process_count;$i++)
|
|
|
{
|
|
|
$process = new Swoole\Process(function(Swoole\Process $worker)
|
|
|
{
|
|
|
+ Co::set(['hook_flags' => SWOOLE_HOOK_NATIVE_CURL|SWOOLE_HOOK_SLEEP]);
|
|
|
+
|
|
|
Base::run_util();
|
|
|
set_error_handler('handle_error');
|
|
|
|