k5i-eq
Last Updated: June 16, 2017
·
12
· lazybios
97eb92522d043b54ef01a9128b7176c0

the way execute rake task in sidekiq-cron

from my experience I am putting code into Service file as service pattern.
so in my rails app I have something like:

app
   models
   services
      some_super_cool_task.rb

which be executed from rake task, sidekiq worker or direclty in app (controller action etc).
Best thing from this aproach is that you can test that code.

Rake task is untestable

Say Thanks
Respond