Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit 6382d1e

Browse files
committed
[ckan#3994] Scope the background job timeout to ckan.
1 parent 85ee64b commit 6382d1e

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

ckan/config/deployment.ini_tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ ckan.hide_activity_from_users = %(ckan.site_id)s
192192
#smtp.mail_from =
193193

194194
## Background Job Settings
195-
bg_job_timeout = 180
195+
ckan.jobs.timeout = 180
196196

197197
## Logging configuration
198198
[loggers]

ckan/lib/jobs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
log = logging.getLogger(__name__)
3737

3838
DEFAULT_QUEUE_NAME = u'default'
39-
DEFAULT_JOB_TIMEOUT = config.get(u'bg_job_timeout', 180)
39+
DEFAULT_JOB_TIMEOUT = config.get(u'ckan.jobs.timeout', 180)
4040

4141
# RQ job queues. Do not use this directly, use ``get_queue`` instead.
4242
_queues = {}

doc/maintaining/background-tasks.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ A timeout can also be set on a job iwth the ``timeout`` keyword argument::
104104
jobs.enqueue(log_job, [u'My log message'], timeout=3600)
105105

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

109109
Accessing the database from background jobs
110110
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

test-core.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ who.log_level = warning
102102
who.log_file = %(cache_dir)s/who_log.ini
103103

104104
## background jobs
105-
bg_job_timeout = 180
105+
ckan.jobs.timeout = 180
106106

107107
# Logging configuration
108108
[loggers]

0 commit comments

Comments
 (0)