diff --git a/ckan/config/deployment.ini_tmpl b/ckan/config/deployment.ini_tmpl index ae4af0a6756..741c9f89a91 100644 --- a/ckan/config/deployment.ini_tmpl +++ b/ckan/config/deployment.ini_tmpl @@ -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] diff --git a/ckan/lib/jobs.py b/ckan/lib/jobs.py index 2a52ceec3ea..500b8fabf12 100644 --- a/ckan/lib/jobs.py +++ b/ckan/lib/jobs.py @@ -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 = {} diff --git a/doc/maintaining/background-tasks.rst b/doc/maintaining/background-tasks.rst index 316d334ae6a..7e2f83a2752 100644 --- a/doc/maintaining/background-tasks.rst +++ b/doc/maintaining/background-tasks.rst @@ -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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/test-core.ini b/test-core.ini index 1a34586539f..febb0d82ca1 100644 --- a/test-core.ini +++ b/test-core.ini @@ -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]