Added que init script #2724

This commit is contained in:
Priit Tark 2015-07-01 14:10:49 +03:00
parent a2e6603ecc
commit 2324d08394
18 changed files with 178 additions and 293 deletions

7
config/daemons.yml Normal file
View file

@ -0,0 +1,7 @@
dir_mode: script
dir: ../../log
multiple: true
backtrace: true
monitor: true
ontop: false
app_name: 'que'

View file

@ -81,3 +81,8 @@ Rails.application.configure do
# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
end
# In off mode, queueing a job will simply insert it into the database -
# the current process will make no effort to run it.
# You should use this if you want to use a dedicated process to work tasks
Que.mode = :off

View file

@ -47,3 +47,8 @@ Rails.application.configure do
Bullet.unused_eager_loading_enable = false
end
end
# In this mode, any jobs you queue will be run in the same thread, synchronously
# (that is, MyJob.enqueue runs the job and won't return until it's completed).
# This makes your application's behavior easier to test
Que.mode = :sync

View file

@ -81,3 +81,8 @@ Rails.application.configure do
# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
end
# In off mode, queueing a job will simply insert it into the database -
# the current process will make no effort to run it.
# You should use this if you want to use a dedicated process to work tasks
Que.mode = :off

View file

@ -84,3 +84,8 @@ Rails.application.configure do
# TODO: Change this:
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
end
# In off mode, queueing a job will simply insert it into the database -
# the current process will make no effort to run it.
# You should use this if you want to use a dedicated process to work tasks
Que.mode = :off

View file

@ -57,3 +57,8 @@ Rails.application.configure do
Bullet.add_whitelist type: :n_plus_one_query, class_name: 'Contact', association: :registrar
end
end
# In this mode, any jobs you queue will be run in the same thread, synchronously
# (that is, MyJob.enqueue runs the job and won't return until it's completed).
# This makes your application's behavior easier to test
Que.mode = :sync

View file

@ -1 +0,0 @@
Que.mode = :off