How to enqueue a Job to ActiveJob without loading the whole rails environment? -
i'd enqueue job activejob different places. command line, cron job. loading whole environment every time, create entry in redis doesn't feel efficient.
is there other solution add job activejob without loading whole rails-application.
i know, should job spring, (i don't know why) still takes around 5 seconds:
> time rails runner -e production 'synchronizestuffjob.perform_later' [activejob] enqueued synchronizestuffjob (job id: 148e34bd-c38c-45c9-86f5-5a959a548ebb) sidekiq(default) real 0m5.122s user 0m4.385s sys 0m0.663s oh , if matters: use sidekiq.
activejob needs rails; cannot use activejob without booting rails.
you can create sidekiq native worker jobs without booting rails.
Comments
Post a Comment