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
Written by lazybios
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#