brandonhilkert / sucker_punch

Sucker Punch is a Ruby asynchronous processing library using concurrent-ruby, heavily influenced by Sidekiq and girl_friday.
MIT License
2.65k stars 114 forks source link

Store tenant info #213

Closed rssluca closed 6 years ago

rssluca commented 6 years ago

Hi,

I am using the apartment gem and was wondering whether it would be possible to store the tenant id when creating a job.

Thanks!!

Luca

brandonhilkert commented 6 years ago

I think this is more of an implementation question. You can always subclass a parent job class that would define a setter or default list of arguments that are required when invoking a job, such that it's accessible from without the job code. I think this would be similar to how you would do it in another other background job processing library, not unique to sucker punch.