fails on add jobs in initializers

25 views
Skip to first unread message

илья л-п

unread,
Jul 15, 2018, 2:58:55 PM7/15/18
to delayed_job
Hi. I have to start some jobs on start app. And I created initializer 
 Delayed::Job.enqueue(NewMessagesNotificationsJob.new, cron: '15,30 * * * *')
But on CI server I got error: 
 ActiveRecord::StatementInvalid: Mysql2::Error: Table '***_test.delayed_jobs' doesn't exist: SHOW FULL FIELDS FROM `delayed_jobs`
On step rake db:schema:load
 
How can I start jobs on start application but avoid this problem on run some rake tasks?

David Genord II

unread,
Jul 16, 2018, 8:21:53 AM7/16/18
to delay...@googlegroups.com
Your database is not setup correctly on CI. The delayed job model and migration are just like any other AR setup. The only difference being that DJ's model is in the gem. Make sure your schema file is correct and that your CI server is using it to load the DB.

David Genord II

--

---
You received this message because you are subscribed to the Google Groups "delayed_job" group.
To unsubscribe from this group and stop receiving emails from it, send an email to delayed_job...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages