Skip to content

Commit

Permalink
fix(scheduler): fixing sync-repo scheduled job
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbaile committed May 13, 2024
1 parent 99348b9 commit c7fae49
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion routes/console.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<?php

use App\Jobs\SyncRepository;
use App\Models\Repository;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Schedule;

Schedule::command('app:sync-repositories -Q')->daily();
Schedule::call(function () {
foreach (Repository::cursor() as $repository) {
Artisan::call(SyncRepository::class, [$repository->name]);
}
})->daily();

0 comments on commit c7fae49

Please sign in to comment.