Fix job dispatch and show log output
All checks were successful
Deploy App / deploy (push) Successful in 11s
All checks were successful
Deploy App / deploy (push) Successful in 11s
This commit is contained in:
@@ -26,14 +26,14 @@ class BotService
|
||||
$instance = app($bot->class, ['config' => $bot->config]);
|
||||
|
||||
if ($instance instanceof BotContract) {
|
||||
dispatch(RunBot::class, $bot->id, $log->id);
|
||||
RunBot::dispatch(bot_id: $bot->id, log_id: $log->id);
|
||||
$log->update([
|
||||
'started_at' => now(),
|
||||
'status' => 'running'
|
||||
'status' => 'pending'
|
||||
]);
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
Log::error("Bot [{$bot->name}] failed: " . $e->getMessage());
|
||||
Log::error("Bot [{$bot->name}] failed: " . $e->getMessage(), ['exception' => $e]);
|
||||
|
||||
$log->update([
|
||||
'finished_at' => now(),
|
||||
|
||||
Reference in New Issue
Block a user