Skip to content

Commit f699c72

Browse files
committed
Merge branch '2.0' of https://github.com/codestudiohq/laravel-totem into 2.0
2 parents cc3b0b1 + 6275779 commit f699c72

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"illuminate/notifications": "~5.5.0"
2626
},
2727
"require-dev": {
28-
"mockery/mockery": "~0.9",
28+
"mockery/mockery": "~1.0",
2929
"orchestra/database": "~3.0",
3030
"orchestra/testbench" : "~3.0",
3131
"phpunit/phpunit": "~6.0"

src/Events/Executed.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,17 @@ public function __construct(Task $task, $started)
1919

2020
$time_elapsed_secs = microtime(true) - $started;
2121

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()));
2324

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+
]);
2829

29-
unlink(storage_path($task->getMutexName()));
30+
unlink(storage_path($task->getMutexName()));
3031

31-
$task->notify(new TaskCompleted($output));
32+
$task->notify(new TaskCompleted($output));
33+
}
3234
}
3335
}

0 commit comments

Comments
 (0)