Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-Core
Commits
36e6c33f
Verified
Commit
36e6c33f
authored
4 years ago
by
Tom Teichler
Browse files
Options
Downloads
Patches
Plain Diff
Use default ProgressRecorder
parent
1e2d2d31
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!491
Resolve "Make Celery non-optional"
Pipeline
#5892
failed
4 years ago
Stage: test
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/core/tasks.py
+6
-4
6 additions, 4 deletions
aleksis/core/tasks.py
with
6 additions
and
4 deletions
aleksis/core/tasks.py
+
6
−
4
View file @
36e6c33f
...
...
@@ -3,11 +3,13 @@ from django.core import management
from
celery.decorators
import
task
from
.celery
import
app
from
.util.celery_progress
import
ProgressRecorder
from
.util.notifications
import
send_notification
as
_send_notification
@task
()
def
send_notification
(
notification
:
int
,
resend
:
bool
=
False
)
->
None
:
@
app.
task
def
send_notification
(
notification
:
int
,
resend
:
bool
=
False
,
recorder
=
ProgressRecorder
)
->
None
:
"""
Send a notification object to its recipient.
:param notification: primary key of the notification object to send
...
...
@@ -16,8 +18,8 @@ def send_notification(notification: int, resend: bool = False) -> None:
_send_notification
(
notification
,
resend
)
@task
()
def
backup_data
()
->
None
:
@
app.
task
def
backup_data
(
recorder
=
ProgressRecorder
)
->
None
:
"""
Backup database and media using django-dbbackup.
"""
# Assemble command-line options for dbbackup management command
db_options
=
[]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment