This repository was archived by the owner on Mar 12, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222run (function ()use ($ config ){
2323 //注册信号处理器
2424 function registerSigintHandler () {
25- global $ tokentimeid ;
25+ global $ tokentimerid ;
2626 $ shouldExit = false ; // 初始化为false
27- Swoole \Process::signal (SIGINT , function ($ signo ) use ($ tokentimeid ) {
27+ Swoole \Process::signal (SIGINT , function ($ signo ) use ($ tokentimerid ) {
2828 try {
2929 global $ shouldExit ;
3030 $ shouldExit = true ; // 设置退出标志
31- Swoole \Timer::clear ($ tokentimeid );
31+ Swoole \Timer::clear ($ tokentimerid );
3232 echo PHP_EOL ;
3333 mlog ("正在退出... " );
3434 exit ();
@@ -45,13 +45,13 @@ function registerSigintHandler() {
4545 mlog ("GetToken: " .$ tokendata ['token ' ],1 );
4646 mlog ("TokenTTL: " .$ tokendata ['upttl ' ],1 );
4747 //启动更新TokenTimer
48- global $ tokentimeid ;
49- $ tokentimeid = Swoole \Timer::tick ($ tokendata ['upttl ' ], function () use ($ token ) {
48+ global $ tokentimerid ;
49+ $ tokentimerid = Swoole \Timer::tick ($ tokendata ['upttl ' ], function () use ($ token ) {
5050 $ tokendata = $ token ->gettoken ();
5151 mlog ("GetNewToken: " .$ tokendata ['token ' ],1 );
5252 });
5353 registerSigintHandler ();
54- mlog ("Timer start on ID {$ tokentimeid }" ,1 );
54+ mlog ("Timer start on ID {$ tokentimerid }" ,1 );
5555
5656 //下载文件列表
5757 $ cluster = new cluster ($ tokendata ['token ' ],VERSION );
You can’t perform that action at this time.
0 commit comments