@@ -6,35 +6,35 @@ All the command-line tools support a set of common configuration flags, defined
66
77The following general flags can be passed as command-line arguments to either ** mrq-worker** ,** mrq-run** , or ** mrq-dashboard** :
88
9- - ` --trace_greenlets ` : Collect stats about each greenlet execution time and switches.Defaults to ** false** .
10- - ` --trace_memory ` : Collect stats about memory for each task. Incompatible with --greenlets > 1. Defaults to ** false** .
11- - ` --trace_io ` : Collect stats about all I/O operations.Defaults to ** true** .
12- - ` --print_mongodb ` : Print all MongoDB requests.Defaults to ** false** .
13- - ` --trace_memory_type ` : Create a .png object graph in trace_memory_output_dir with a random object of this type.
14- - ` --trace_memory_output_dir ` : Directory where to output .pngs with object graphs.Defaults to folder ** memory_traces** .
15- - ` --profile ` : Run profiling on the whole worker.Defaults to ** false** .
16- - ` --mongodb_jobs, --mongodb ` : MongoDB URI for the jobs, scheduled_jobs & workers database.Defaults to ** mongodb://127.0.0.1:27017/mrq** .
17- - ` --mongodb_logs ` : MongoDB URI for the logs database."0" will disable remote logs, "1" will use main MongoDB.Defaults to ** 1**
18- - ` --mongodb_logs_size ` : If provided, sets the log collection to capped to that amount of bytes.
19- - ` --no_mongodb_ensure_indexes ` : If provided, skip the creation of MongoDB indexes at worker startup.
20- - ` --redis ` : Redis URI.Defaults to ** redis://127.0.0.1:6379** .
21- - ` --redis_prefix ` : Redis key prefix.Default to "mrq".
22- - ` --redis_max_connections ` : Redis max connection pool size.Defaults to ** 1000** .
23- - ` --redis_timeout ` : Redis connection pool timeout to wait for an available connection.Defaults to ** 30** .
24- - ` --name ` : Specify a different name.
25- - ` --quiet ` : Don \ ' t output task logs.Defaults to ** false** .
26- - ` --config, -c ` : Path of a config file.
27- - ` --worker_class ` : Path to a custom worker class.Defaults to ** "mrq.worker.Worker"** .
28- - ` --version, -v ` : Prints current MRQ version.Defaults to ** false** .
29- - ` --no_import_patch ` : Skips patching __ import__ to fix gevent bug #108 .Defaults to ** false** .
30- - ` --add_network_latency ` : Adds random latency to the network calls, zero to N seconds. Can be a range (1-2)').Defaults to ** 0** .
31- - ` --default_job_result_ttl ` : Seconds the results are kept in MongoDB when status is success.Defaults to ** 604800** seconds which is 7 days.
32- - ` --default_job_abort_ttl ` : Seconds the tasks are kept in MongoDB when status is abort.Defaults to ** 86400** seconds which is 1 day.
33- - ` --default_job_cancel_ttl ` : Seconds the tasks are kept in MongoDB when status is cancelDefaults to ** 86400** seconds which is 1 day.
34- - ` --default_job_timeout ` : In seconds, delay before interrupting the job.Defaults to ** 3600** seconds which is 1 hour.
35- - ` --default_job_max_retries ` : Set the status to "maxretries" after retrying that many times.Defaults to ** 3** seconds.
36- - ` --default_job_retry_delay ` : Seconds before a job in retry status is requeued again.Defaults to ** 3** seconds.
37- - ` --use_large_job_ids ` : Do not use compacted job IDs in Redis. For compatibility with 0.1.x only. Defaults to ** false** .
9+ - ` --trace_greenlets ` : Collect stats about each greenlet execution time and switches. Defaults to ** false** .
10+ - ` --trace_memory ` : Collect stats about memory for each task. Incompatible with --greenlets > 1. Defaults to ** false** .
11+ - ` --trace_io ` : Collect stats about all I/O operations. Defaults to ** true** .
12+ - ` --print_mongodb ` : Print all MongoDB requests. Defaults to ** false** .
13+ - ` --trace_memory_type ` : Create a .png object graph in trace_memory_output_dir with a random object of this type.
14+ - ` --trace_memory_output_dir ` : Directory where to output .pngs with object graphs. Defaults to folder ** memory_traces** .
15+ - ` --profile ` : Run profiling on the whole worker. Defaults to ** false** .
16+ - ` --mongodb_jobs, --mongodb ` : MongoDB URI for the jobs, scheduled_jobs & workers database. Defaults to ** mongodb://127.0.0.1:27017/mrq** .
17+ - ` --mongodb_logs ` : MongoDB URI for the logs database."0" will disable remote logs, "1" will use main MongoDB. Defaults to ** 1**
18+ - ` --mongodb_logs_size ` : If provided, sets the log collection to capped to that amount of bytes.
19+ - ` --no_mongodb_ensure_indexes ` : If provided, skip the creation of MongoDB indexes at worker startup.
20+ - ` --redis ` : Redis URI. Defaults to ** redis://127.0.0.1:6379** .
21+ - ` --redis_prefix ` : Redis key prefix. Defaults to "mrq".
22+ - ` --redis_max_connections ` : Redis max connection pool size. Defaults to ** 1000** .
23+ - ` --redis_timeout ` : Redis connection pool timeout to wait for an available connection. Defaults to ** 30** .
24+ - ` --name ` : Specify a different name.
25+ - ` --quiet ` : Don't output task logs. Defaults to ** false** .
26+ - ` --config, -c ` : Path of a config file.
27+ - ` --worker_class ` : Path to a custom worker class. Defaults to ** "mrq.worker.Worker"** .
28+ - ` --version, -v ` : Prints current MRQ version. Defaults to ** false** .
29+ - ` --no_import_patch ` : Skips patching __ import__ to fix gevent bug #108 . Defaults to ** false** .
30+ - ` --add_network_latency ` : Adds random latency to the network calls, zero to N seconds. Can be a range (1-2)'). Defaults to ** 0** .
31+ - ` --default_job_result_ttl ` : Seconds the results are kept in MongoDB when status is success. Defaults to ** 604800** seconds which is 7 days.
32+ - ` --default_job_abort_ttl ` : Seconds the tasks are kept in MongoDB when status is abort. Defaults to ** 86400** seconds which is 1 day.
33+ - ` --default_job_cancel_ttl ` : Seconds the tasks are kept in MongoDB when status is cancel. Defaults to ** 86400** seconds which is 1 day.
34+ - ` --default_job_timeout ` : In seconds, delay before interrupting the job. Defaults to ** 3600** seconds which is 1 hour.
35+ - ` --default_job_max_retries ` : Set the status to "maxretries" after retrying that many times. Defaults to ** 3** seconds.
36+ - ` --default_job_retry_delay ` : Seconds before a job in retry status is requeued again. Defaults to ** 3** seconds.
37+ - ` --use_large_job_ids ` : Do not use compacted job IDs in Redis. For compatibility with 0.1.x only. Defaults to ** false** .
3838
3939## mrq-worker
4040
@@ -44,20 +44,20 @@ The following general flags can be passed as command-line arguments to either **
4444
4545You can pass additional configuration flags:
4646
47- - ` --max_jobs ` :Gevent: max number of jobs to do before quitting. Temp workaround for memory leaks. Defaults to ** 0**
48- - ` --max_memory ` : Max memory (in Mb) after which the process will be shut down. Use with ` --processes [1-N] `
49- to have supervisord automatically respawn the worker when this happens.Defaults to ** 1**
50- - ` --grenlets, --gevent, --g ` : Max number of greenlets to use.Defaults to ** 1** .
51- - ` --processes, --p ` : Number of processes to launch with supervisord.Defaults to ** 0** .
52- - ` --supervisord_template ` : Path of supervisord template to use. Defaults to ** supervisord_templates/default.conf** .
53- - ` --scheduler ` : Run the scheduler.Defaults to ** false** .
54- - ` --scheduler_interval ` : Seconds between scheduler checks.Defaults to ** 60** seconds, only ints are acceptable.
55- - ` --report_interval ` : Seconds between worker reports to MongoDB.Defaults to ** 10** seconds, floats are acceptable too.
56- - ` --report_file ` : Filepath of a json dump of the worker status. Disabled if none.
57- - ` --admin_port ` : Start an admin server on this port, if provided. Incompatible with --processes.Defaults to ** 0**
58- - ` --admin_ip ` : IP for the admin server to listen on. Use "0.0.0.0" to allow access from outside.Defaults to ** 127.0.0.1** .
59- - ` --local_ip ` : Overwrite the local IP, to be displayed in the dashboard.
60- - ` --max_latency ` : Max seconds while worker may sleep waiting for a new job.Can be < 1 and a float value.
47+ - ` --max_jobs ` : Gevent: max number of jobs to do before quitting. Use as a temporary workaround for memory leaks in your tasks. Defaults to ** 0**
48+ - ` --max_memory ` : Max memory (in Mb) after which the process will be shut down. Use with ` --processes [1-N] `
49+ to have supervisord automatically respawn the worker when this happens. Defaults to ** 1**
50+ - ` --grenlets, --gevent, --g ` : Max number of greenlets to use. Defaults to ** 1** .
51+ - ` --processes, --p ` : Number of processes to launch with supervisord. Defaults to ** 0** (no supervisord) .
52+ - ` --supervisord_template ` : Path of supervisord template to use. Defaults to ** supervisord_templates/default.conf** .
53+ - ` --scheduler ` : Run the scheduler. Defaults to ** false** .
54+ - ` --scheduler_interval ` : Seconds between scheduler checks. Defaults to ** 60** seconds, only ints are acceptable.
55+ - ` --report_interval ` : Seconds between worker reports to MongoDB. Defaults to ** 10** seconds, floats are acceptable too.
56+ - ` --report_file ` : Filepath of a json dump of the worker status. Disabled if none.
57+ - ` --admin_port ` : Start an admin server on this port, if provided. Incompatible with --processes. Defaults to ** 0**
58+ - ` --admin_ip ` : IP for the admin server to listen on. Use "0.0.0.0" to allow access from outside. Defaults to ** 127.0.0.1** .
59+ - ` --local_ip ` : Overwrite the local IP, to be displayed in the dashboard.
60+ - ` --max_latency ` : Max seconds while worker may sleep waiting for a new job. Can be < 1 and a float value.
6161
6262### Worker concurrency
6363
@@ -79,18 +79,18 @@ To do this we added a ```--add_network_latency=0.1``` config option that will ad
7979
8080` mrq-dashboard ` starts the web dashboard on the default port and takes these arguments:
8181
82- - ` --dashboard_httpauth ` : HTTP Auth for the Dashboard. Format is user: pass .
83- - ` --dashboard_queue ` : Default queue for dashboard actions.
84- - ` --dashboard_port ` : Use this port for mrq-dashboard.Defaults to port ** 5555** .
85- - ` --dashboard_ip ` : Bind the dashboard to this IP. Default is ** 0.0.0.0** , use ** 127.0.0.1** to restrict access.
82+ - ` --dashboard_httpauth ` : HTTP Auth for the Dashboard. Format is user: pass .
83+ - ` --dashboard_queue ` : Default queue for dashboard actions.
84+ - ` --dashboard_port ` : Use this port for mrq-dashboard. Defaults to port ** 5555** .
85+ - ` --dashboard_ip ` : Bind the dashboard to this IP. Default is ** 0.0.0.0** , use ** 127.0.0.1** to restrict access.
8686
8787## mrq-run
8888
8989` mrq-run ` runs a one-off task. If you add the ` --queue ` option that will enqueue it to be later ran by a worker.
9090
91- - ` taskpath ` : Task to run.
92- - ` taskargs ` : JSON-encoded arguments, or "key value" pairs.
93- - ` --queue ` : Queue the task on this queue instead of running it right away.
91+ - ` taskpath ` : Task to run.
92+ - ` taskargs ` : JSON-encoded arguments, or "key value" pairs.
93+ - ` --queue ` : Queue the task on this queue instead of running it right away.
9494
9595Typical usage is:
9696
0 commit comments