You can configure Fireworq by providing environment variables on starting a daemon (for both docker-composed and manually-set-up instances) or by specifying command line arguments (for a manual setup). Command line arguments precede the values of environment variables.
The following variables/arguments are available. Some of them are applicable only to a manual setup.
- Common Variables/Arguments
FIREWORQ_ACCESS_LOG
,--access-log
FIREWORQ_ACCESS_LOG_TAG
,--access-log-tag
FIREWORQ_DISPATCH_KEEP_ALIVE
,--dispatch-keep-alive
FIREWORQ_DISPATCH_USER_AGENT
,--dispatch-user-agent
FIREWORQ_ERROR_LOG
,--error-log
FIREWORQ_ERROR_LOG_LEVEL
,--error-log-level
FIREWORQ_KEEP_ALIVE
,--keep-alive
FIREWORQ_PID
,--pid
FIREWORQ_QUEUE_DEFAULT
,--queue-default
FIREWORQ_QUEUE_DEFAULT_MAX_WORKERS
,--queue-default-max-workers
FIREWORQ_QUEUE_DEFAULT_POLLING_INTERVAL
,--queue-default-polling-interval
FIREWORQ_QUEUE_LOG
,--queue-log
FIREWORQ_QUEUE_LOG_LEVEL
,--queue-log-level
FIREWORQ_QUEUE_LOG_TAG
,--queue-log-tag
- Variables/Arguments only Applicable to Manual Setup
- Variables only Applicable to a Docker-composed Instance
Specifies a file where API access log is written to. It defaults to standard output.
Each line in the file is a JSON string corresponds to a single log item.
Default: fireworq.access
Specifies the value of tag
field in a access log item.
Specifies whether a connection to a worker should be reused. This overrides the default keep-alive setting.
Specifies the value of User-Agent
header field used for an HTTP request to a worker. The default value is Fireworq/version
.
Specifies a file where error logs are written to. It defaults to standard error output.
If this value is specified, each line in the file is a JSON string corresponds to a single log item. Otherwise, each line of the output is is prettified log item.
Specifies a log level of the access log. The level is either a name or a numeric value. The following table describes the meaning of the value.
Value | Name |
---|---|
0 |
debug |
1 |
info |
2 |
warn |
3 |
error |
4 |
fatal |
If none of these values is specified, the level is determined by DEBUG
environment variable. If DEBUG
has a non-empty value, then the level is debug
. Otherwise, the level is info
.
Default: false
Specifies whether connections should be reused.
Specifies a file where PID is written to.
Specifies the name of a default queue. A job whose category
is not defined via the routing API will be delivered to this queue. If no default queue name is specified, pushing a job with an unknown category will fail for a manual setup. A docker-composed instance uses default
as a default value.
If you already have a queue with the specified name in the job queue database, that one is used. Or otherwise a new queue is created automatically.
Default: 20
Specifies the default maximum number of jobs that are processed simultaneously in a queue, used when max_workers
in the queue API is omitted.
Default: 200
Specifies the default interval, in milliseconds, at which Fireworq checks the arrival of new jobs, used when polling_interval
in the queue API is omitted.
Specifies a file where the job queue logs are written to. It defaults to standard output. No other logs than the job queue logs are written to this file.
Each line in the file is a JSON string corresponds to a single log item.
Specifies a log level of the job queue logs. The level is either a name or a numeric value. The following table describes the meaning of the value.
Value | Name |
---|---|
0 |
debug |
1 |
info |
2 |
warn |
3 |
error |
4 |
fatal |
If none of these values is specified, the level is determined by DEBUG
environment variable. If DEBUG
has a non-empty value, then the level is debug
. Otherwise, the level is info
.
Default: fireworq.queue
Specifies the value of tag
field in a job queue log item JSON.
Default: 127.0.0.1:8080
Specifies the address and the port number of a daemon in a form address:port
.
Default: 1000
Specifies an interval, in milliseconds, at which a Fireworq daemon checks if configurations (such as queue definitions or routings) are changed by other daemons.
Default: mysql
Specifies a driver for job queues and repositories. The available values are mysql
and in-memory
.
Note that in-memory
driver is not for production use. It is intended to be used for just playing with Fireworq without a storage middleware or to show the upper bound of performance in a benchmark.
Default: tcp(localhost:3306)/fireworq
Specifies a data source name for the job queue and the repository database in a form user:password@tcp(mysql_host:mysql_port)/database?options
. This is in effect only when the driver is mysql
and is mandatory for that case.
Specifies a data source name for the job queue database in a form user:password@tcp(mysql_host:mysql_port)/database?options
. This is in effect only when the driver is mysql
and overrides the default DSN. This should be used when you want to specify a DSN differs from the repository DSN.
Specifies a data source name for the repository database in a form user:password@tcp(mysql_host:mysql_port)/database?options
. This is in effect only when the driver is mysql
and overrides the default DSN. This should be used when you want to specify a DSN differs from the queue DSN.
Default: 30
Specifies a timeout, in seconds, which the daemon waits on gracefully shutting down or restarting.
Default: 8080
Specifies the port number of a daemon.