Add and install delayed_cron_job gem
This commit is contained in:
parent
608419701e
commit
8965c668d9
4 changed files with 15 additions and 1 deletions
1
Gemfile
1
Gemfile
|
@ -103,6 +103,7 @@ gem 'sinatra', git: 'https://github.com/sinatra/sinatra.git', require: false
|
||||||
|
|
||||||
# Cron jobs
|
# Cron jobs
|
||||||
gem 'delayed_job_active_record'
|
gem 'delayed_job_active_record'
|
||||||
|
gem 'delayed_cron_job'
|
||||||
|
|
||||||
gem 'select2-rails'
|
gem 'select2-rails'
|
||||||
|
|
||||||
|
|
|
@ -130,6 +130,8 @@ GEM
|
||||||
debug_inspector (0.0.2)
|
debug_inspector (0.0.2)
|
||||||
deep_cloneable (2.2.2)
|
deep_cloneable (2.2.2)
|
||||||
activerecord (>= 3.1.0, < 5.2.0)
|
activerecord (>= 3.1.0, < 5.2.0)
|
||||||
|
delayed_cron_job (0.7.2)
|
||||||
|
delayed_job (>= 4.1)
|
||||||
delayed_job (4.1.3)
|
delayed_job (4.1.3)
|
||||||
activesupport (>= 3.0, < 5.2)
|
activesupport (>= 3.0, < 5.2)
|
||||||
delayed_job_active_record (4.1.2)
|
delayed_job_active_record (4.1.2)
|
||||||
|
@ -701,6 +703,7 @@ DEPENDENCIES
|
||||||
copy_carrierwave_file
|
copy_carrierwave_file
|
||||||
database_cleaner
|
database_cleaner
|
||||||
deep_cloneable (~> 2.2.1)
|
deep_cloneable (~> 2.2.1)
|
||||||
|
delayed_cron_job
|
||||||
delayed_job_active_record
|
delayed_job_active_record
|
||||||
devise
|
devise
|
||||||
dotenv-rails
|
dotenv-rails
|
||||||
|
|
9
db/migrate/20170926092716_add_cron_to_delayed_jobs.rb
Normal file
9
db/migrate/20170926092716_add_cron_to_delayed_jobs.rb
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
class AddCronToDelayedJobs < ActiveRecord::Migration[5.0]
|
||||||
|
def self.up
|
||||||
|
add_column :delayed_jobs, :cron, :string
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
remove_column :delayed_jobs, :cron
|
||||||
|
end
|
||||||
|
end
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20170926083816) do
|
ActiveRecord::Schema.define(version: 20170926092716) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
@ -174,6 +174,7 @@ ActiveRecord::Schema.define(version: 20170926083816) do
|
||||||
t.string "queue"
|
t.string "queue"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
|
t.string "cron"
|
||||||
t.index ["priority", "run_at"], name: "delayed_jobs_priority", using: :btree
|
t.index ["priority", "run_at"], name: "delayed_jobs_priority", using: :btree
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue