mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Add enable_celery_tasks config option
This commit is contained in:
@@ -4360,6 +4360,18 @@
|
||||
:Type: str
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
``enable_celery_tasks``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
:Description:
|
||||
Offload long-running tasks to a Celery task queue. Activate this
|
||||
only if you have setup a Celery worker for Galaxy. For details,
|
||||
see https://docs.galaxyproject.org/en/master/admin/production.html
|
||||
:Default: ``false``
|
||||
:Type: bool
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~
|
||||
``use_pbkdf2``
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
@@ -2159,6 +2159,11 @@ galaxy:
|
||||
# commented out line below).
|
||||
#amqp_internal_connection: sqlalchemy+sqlite:///./database/control.sqlite?isolation_level=IMMEDIATE
|
||||
|
||||
# Offload long-running tasks to a Celery task queue. Activate this
|
||||
# only if you have setup a Celery worker for Galaxy. For details, see
|
||||
# https://docs.galaxyproject.org/en/master/admin/production.html
|
||||
#enable_celery_tasks: false
|
||||
|
||||
# Allow disabling pbkdf2 hashing of passwords for legacy situations.
|
||||
# This should normally be left enabled unless there is a specific
|
||||
# reason to disable it.
|
||||
|
||||
@@ -3183,6 +3183,15 @@ mapping:
|
||||
will automatically create and use a separate sqlite database located in your
|
||||
<galaxy>/database folder (indicated in the commented out line below).
|
||||
|
||||
enable_celery_tasks:
|
||||
type: bool
|
||||
default: false
|
||||
required: false
|
||||
desc: |
|
||||
Offload long-running tasks to a Celery task queue.
|
||||
Activate this only if you have setup a Celery worker for Galaxy.
|
||||
For details, see https://docs.galaxyproject.org/en/master/admin/production.html
|
||||
|
||||
use_pbkdf2:
|
||||
type: bool
|
||||
default: true
|
||||
|
||||
@@ -222,9 +222,12 @@ class User(BaseUIController, UsesFormDefinitionsMixin, CreatesApiKeysMixin):
|
||||
if message:
|
||||
return self.message_exception(trans, message)
|
||||
if trans.user:
|
||||
# Queue a quota recalculation (async) task -- this takes a
|
||||
# while sometimes, so we don't want to block on logout.
|
||||
recalculate_user_disk_usage.delay(user_id=trans.user.id)
|
||||
if trans.app.config.enable_celery_tasks:
|
||||
# Queue a quota recalculation (async) task -- this takes a
|
||||
# while sometimes, so we don't want to block on logout.
|
||||
recalculate_user_disk_usage.delay(user_id=trans.user.id)
|
||||
else:
|
||||
trans.user.calculate_and_set_disk_usage()
|
||||
# Since logging an event requires a session, we'll log prior to ending the session
|
||||
trans.log_event("User logged out")
|
||||
trans.handle_user_logout(logout_all=logout_all)
|
||||
|
||||
Reference in New Issue
Block a user