Add basecontract
All checks were successful
Deploy App / deploy (push) Successful in 10s

This commit is contained in:
2025-09-04 17:57:15 +02:00
parent 1565df568d
commit aa27851bd7
7 changed files with 39 additions and 22 deletions

View File

@@ -2,8 +2,10 @@
namespace App\Services;
use App\Interfaces\BaseContract;
use App\Models\Bot;
use App\Bots\BotContract;
use App\Interfaces\BotContract;
use App\Interfaces\ScriptContract;
use App\Jobs\RunBot;
use Cron\CronExpression;
use Illuminate\Support\Facades\Log;
@@ -25,7 +27,7 @@ class BotService
try {
$instance = app($bot->class, ['config' => $bot->config]);
if ($instance instanceof BotContract) {
if ($instance instanceof BaseContract) {
RunBot::dispatch(bot_id: $bot->id, log_id: $log->id);
$log->update([
'started_at' => now(),