Skip to content

Conversation

@techmahedy
Copy link
Member

Now we can call like this to handle before after job state

  $this->worker->setOnJobProcessing(function ($job) {
      $jobClass = get_class($job);
      $jobId = $job->getJobId() ?? 'N/A';
      $this->info("✔ Processing job [{$jobClass}] (ID: {$jobId})");
  });

$this->worker->setOnJobProcessed(function ($job) {
    $jobClass = get_class($job);
    $jobId = $job->getJobId() ?? 'N/A';
    $this->info("✔ Processed job [{$jobClass}] (ID: {$jobId})");

    // Flush system output buffer
    flush();
});

@techmahedy techmahedy merged commit a1f668d into master Nov 13, 2025
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants