mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-10 23:47:55 -05:00
Add queue consumer upstart jobs.
This commit is contained in:
14
upstart/reddit-consumer-cloudsearch_q.conf
Normal file
14
upstart/reddit-consumer-cloudsearch_q.conf
Normal file
@@ -0,0 +1,14 @@
|
||||
description "update the cloudsearch index with new/changed documents"
|
||||
|
||||
instance $x
|
||||
|
||||
stop on runlevel [016]
|
||||
|
||||
respawn
|
||||
respawn limit 10 5
|
||||
|
||||
nice 10
|
||||
script
|
||||
. /etc/default/reddit
|
||||
wrap-job paster run --proctitle cloudsearch_q$x $REDDIT_INI $REDDIT_ROOT/r2/lib/cloudsearch.py -c 'run_changed()'
|
||||
end script
|
||||
14
upstart/reddit-consumer-commentstree_q.conf
Normal file
14
upstart/reddit-consumer-commentstree_q.conf
Normal file
@@ -0,0 +1,14 @@
|
||||
description "place new comments in the precomputed comment trees"
|
||||
|
||||
instance $x
|
||||
|
||||
stop on runlevel [016]
|
||||
|
||||
respawn
|
||||
respawn limit 10 5
|
||||
|
||||
nice 10
|
||||
script
|
||||
. /etc/default/reddit
|
||||
wrap-job paster run --proctitle commentstree_q$x $REDDIT_INI $REDDIT_ROOT/r2/lib/db/queries.py -c 'run_commentstree()'
|
||||
end script
|
||||
14
upstart/reddit-consumer-log_q.conf
Normal file
14
upstart/reddit-consumer-log_q.conf
Normal file
@@ -0,0 +1,14 @@
|
||||
description "consume log messages from log_q (including exception tracebacks)"
|
||||
|
||||
instance $x
|
||||
|
||||
stop on runlevel [016]
|
||||
|
||||
respawn
|
||||
respawn limit 10 5
|
||||
|
||||
nice 10
|
||||
script
|
||||
. /etc/default/reddit
|
||||
wrap-job paster run --proctitle log_q$x $REDDIT_INI $REDDIT_ROOT/../scripts/log_q.py -c 'run(verbose=True)'
|
||||
end script
|
||||
14
upstart/reddit-consumer-newcomments_q.conf
Normal file
14
upstart/reddit-consumer-newcomments_q.conf
Normal file
@@ -0,0 +1,14 @@
|
||||
description "newcomments_q - update the /comments pages"
|
||||
|
||||
instance $x
|
||||
|
||||
stop on runlevel [016]
|
||||
|
||||
respawn
|
||||
respawn limit 10 5
|
||||
|
||||
nice 10
|
||||
script
|
||||
. /etc/default/reddit
|
||||
wrap-job paster run --proctitle newcomments_q$x $REDDIT_INI $REDDIT_ROOT/r2/lib/db/queries.py -c 'run_new_comments()'
|
||||
end script
|
||||
14
upstart/reddit-consumer-scraper_q.conf
Normal file
14
upstart/reddit-consumer-scraper_q.conf
Normal file
@@ -0,0 +1,14 @@
|
||||
description "find thumbnails/embedded content for newly submitted links"
|
||||
|
||||
instance $x
|
||||
|
||||
stop on runlevel [016]
|
||||
|
||||
respawn
|
||||
respawn limit 10 5
|
||||
|
||||
nice 10
|
||||
script
|
||||
. /etc/default/reddit
|
||||
wrap-job paster run --proctitle scraper_q$x $REDDIT_INI $REDDIT_ROOT/r2/lib/media.py -c 'run()'
|
||||
end script
|
||||
10
upstart/reddit-consumers-restart.conf
Normal file
10
upstart/reddit-consumers-restart.conf
Normal file
@@ -0,0 +1,10 @@
|
||||
description "restart queue consumers"
|
||||
|
||||
task
|
||||
|
||||
start on reddit-restart or reddit-kill
|
||||
|
||||
script
|
||||
. /etc/default/reddit
|
||||
manage-consumers
|
||||
end script
|
||||
10
upstart/reddit-consumers-start.conf
Normal file
10
upstart/reddit-consumers-start.conf
Normal file
@@ -0,0 +1,10 @@
|
||||
description "start up queue consumers"
|
||||
|
||||
task
|
||||
|
||||
start on runlevel [2345] or reddit-start
|
||||
|
||||
script
|
||||
. /etc/default/reddit
|
||||
manage-consumers
|
||||
end script
|
||||
Reference in New Issue
Block a user