Fix job dispatch and show log output
All checks were successful
Deploy App / deploy (push) Successful in 11s

This commit is contained in:
2025-09-04 17:38:30 +02:00
parent 6a72b7150b
commit 1565df568d
7 changed files with 45 additions and 15 deletions

View File

@@ -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(),