Skip to content

Comments

console output improved and before and after callback added for comma…#2

Merged
techmahedy merged 1 commit intomasterfrom
commands
Nov 13, 2025
Merged

console output improved and before and after callback added for comma…#2
techmahedy merged 1 commit intomasterfrom
commands

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.

1 participant