ruby on rails - delayed_job works only with rake jobs:workoff, not with RAILS_ENV=production bin/delayed_job start -
i have pretty simple task - need check if submission assigned developer within 2 minutes after created. , if not, send email notifying it.
app written in rails4. decided utilize delayed_job gem.
after_create :unassigned_submission_pending_notification def unassigned_submission_pending_notification notificationmailer.unassigned_submissions_pending(self).deliver if developer_id.nil? end handle_asynchronously :unassigned_submission_pending_notification, run_at: proc.new { 2.minutes.from_now } in documentation said run rails_env=production bin/delayed_job start create worker job. in case command nothing, , when run rake jobs:workoff works.
any thoughts why?
thank you!
you can seek this:
rails_env=production bundle exec bin/delayed_job start or this:
rake jobs:work ruby-on-rails delayed-job
No comments:
Post a Comment