lorisleiva / laravel-actions

⚡️ Laravel components that take care of one specific task
https://laravelactions.com
MIT License
2.41k stars 117 forks source link

horizon silenced jobs support #256

Open leventcz opened 10 months ago

leventcz commented 10 months ago

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"