File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1414namespace cleanphp \process ;
1515
1616use cleanphp \App ;
17+ use cleanphp \base \Dump ;
1718use cleanphp \base \Error ;
1819use cleanphp \base \EventManager ;
1920use cleanphp \base \Request ;
@@ -137,11 +138,17 @@ public static function response()
137138 App::exit ("您无权访问该资源。 " );
138139 return ;
139140 }
140-
141+ try {
141142 $ key = $ asyncObject ->key ;
142143 $ function = $ asyncObject ->function ;
143144 $ timeout = $ asyncObject ->timeout ;
145+ } catch (NoticeException $ exception ) {
146+ Log::record ("Async " , "序列化对象错误! " );
147+
148+ Log::record ("Async " , "错误对象: " .(new Dump ())->dumpTypeAsString ($ asyncObject ));
144149
150+ App::exit ("序列化对象错误 " );
151+ }
145152 set_time_limit ($ timeout );
146153 Variables::set ("__async_task_id__ " , $ key );
147154 Variables::set ("__frame_log_tag__ " , "async_ {$ key }_ " );
Original file line number Diff line number Diff line change @@ -30,6 +30,13 @@ public static function getList()
3030 if (empty ($ list )) {
3131 return [];
3232 } else {
33+
34+ foreach ($ list as $ key =>$ value ){
35+ if (!is_object ($ value )|| get_class ($ value )!==TaskInfo::class){
36+ unset($ list [$ key ]);
37+ }
38+ }
39+
3340 return $ list ;
3441 }
3542 }
You can’t perform that action at this time.
0 commit comments