laravel-actions icon indicating copy to clipboard operation
laravel-actions copied to clipboard

horizon silenced jobs support

Open leventcz opened this issue 1 year ago • 0 comments

hi,

i was wondering if there is any way to use action as a silenced job.

https://laravel.com/docs/10.x/horizon#silenced-jobs

  /**
   * Determine if the underlying job class should be silenced.
   *
   * @param  mixed  $job
   * @return bool
   */
  protected function shouldBeSilenced($job)
  {
      if (! $job) {
          return false;
      }

      $underlyingJob = $this->underlyingJob($job);

      $jobClass = is_string($underlyingJob) ? $underlyingJob : get_class($underlyingJob);

      return in_array($jobClass, config('horizon.silenced', [])) ||
             is_a($jobClass, Silenced::class, true);
  }

it seems impossible.. as it receives "Lorisleiva\Actions\Decorators\JobDecorator"

leventcz avatar Sep 08 '23 17:09 leventcz