lorisleiva / laravel-actions

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

horizon silenced jobs support #256

Closed leventcz closed 1 month ago

leventcz commented 1 year 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"

Wulfheart commented 1 month ago

Closing due to inactivity. If you feel your issue is still relevant please open a new one with a link to a repository containing a minimal reproducible example.