File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -19,15 +19,17 @@ public function __construct(Task $task, $started)
19
19
20
20
$ time_elapsed_secs = microtime (true ) - $ started ;
21
21
22
- $ output = file_get_contents (storage_path ($ task ->getMutexName ()));
22
+ if (file_exists (storage_path ($ task ->getMutexName ()))) {
23
+ $ output = file_get_contents (storage_path ($ task ->getMutexName ()));
23
24
24
- $ task ->results ()->create ([
25
- 'duration ' => $ time_elapsed_secs * 1000 ,
26
- 'result ' => $ output ,
27
- ]);
25
+ $ task ->results ()->create ([
26
+ 'duration ' => $ time_elapsed_secs * 1000 ,
27
+ 'result ' => $ output ,
28
+ ]);
28
29
29
- unlink (storage_path ($ task ->getMutexName ()));
30
+ unlink (storage_path ($ task ->getMutexName ()));
30
31
31
- $ task ->notify (new TaskCompleted ($ output ));
32
+ $ task ->notify (new TaskCompleted ($ output ));
33
+ }
32
34
}
33
35
}
You can’t perform that action at this time.
0 commit comments