Skip to content

Commit

Permalink
[#3994] Scope the background job timeout to ckan.
Browse files Browse the repository at this point in the history
  • Loading branch information
scottdillon committed Jan 17, 2019
1 parent 85ee64b commit 6382d1e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ckan/config/deployment.ini_tmpl
Expand Up @@ -192,7 +192,7 @@ ckan.hide_activity_from_users = %(ckan.site_id)s
#smtp.mail_from =

## Background Job Settings
bg_job_timeout = 180
ckan.jobs.timeout = 180

## Logging configuration
[loggers]
Expand Down
2 changes: 1 addition & 1 deletion ckan/lib/jobs.py
Expand Up @@ -36,7 +36,7 @@
log = logging.getLogger(__name__)

DEFAULT_QUEUE_NAME = u'default'
DEFAULT_JOB_TIMEOUT = config.get(u'bg_job_timeout', 180)
DEFAULT_JOB_TIMEOUT = config.get(u'ckan.jobs.timeout', 180)

# RQ job queues. Do not use this directly, use ``get_queue`` instead.
_queues = {}
Expand Down
2 changes: 1 addition & 1 deletion doc/maintaining/background-tasks.rst
Expand Up @@ -104,7 +104,7 @@ A timeout can also be set on a job iwth the ``timeout`` keyword argument::
jobs.enqueue(log_job, [u'My log message'], timeout=3600)

The default background job timeout is 180 seconds. This is set in the
ckan config ``.ini`` file under the ``bg_job_timeout`` item.
ckan config ``.ini`` file under the ``ckan.jobs.timeout`` item.

Accessing the database from background jobs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion test-core.ini
Expand Up @@ -102,7 +102,7 @@ who.log_level = warning
who.log_file = %(cache_dir)s/who_log.ini

## background jobs
bg_job_timeout = 180
ckan.jobs.timeout = 180

# Logging configuration
[loggers]
Expand Down

0 comments on commit 6382d1e

Please sign in to comment.