Skip to content
Snippets Groups Projects
Verified Commit c1d6734b authored by Dillenn Terumalai's avatar Dillenn Terumalai :speech_balloon:
Browse files

fix: Fixed interface for callbacks and mapped Unknown to no action for queued_at

parent cbd1471c
No related branches found
No related tags found
No related merge requests found
Pipeline #6636 passed
......@@ -8,7 +8,7 @@ use Dterumal\LaravelCluster\Storage\JobModel;
interface ClusterWithCallbacks
{
public function onFailure(JobModel $clusterJob, \Throwable $e): void;
public function onFailure(JobModel $clusterJob): void;
public function onSuccess(JobModel $clusterJob): void;
......
......@@ -44,10 +44,12 @@ class DatabaseJobRepository implements JobRepository
*/
public function queued(JobModel $clusterJob, string $datetime): void
{
if ($datetime !== 'Unknown') {
$clusterJob->update([
'queued_at' => $datetime
]);
}
}
/**
* Mark the job as failed
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment