Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
188bbcc7
Verified
Commit
188bbcc7
authored
Nov 11, 2018
by
Sébastiaan Versteeg
Browse files
Remove Celery dependency
parent
78af8b13
Changes
21
Hide whitespace changes
Inline
Side-by-side
website/utils/tasks.py
deleted
100644 → 0
View file @
78af8b13
from
django.utils
import
timezone
from
thaliawebsite
import
celery_app
from
django.conf
import
settings
def
schedule_task
(
task
,
args
=
(),
eta
=
timezone
.
now
()):
if
settings
.
CELERY_ENABLED
:
result
=
task
.
apply_async
(
args
,
eta
=
eta
)
return
result
.
id
return
None
def
revoke_task
(
task_id
):
if
settings
.
CELERY_ENABLED
:
celery_app
.
control
.
revoke
(
task_id
)
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment