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
54df673c
Verified
Commit
54df673c
authored
4 years ago
by
Tom Teichler
Browse files
Options
Downloads
Patches
Plain Diff
Reduce size of diff
parent
e2848cb8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!491
Resolve "Make Celery non-optional"
Pipeline
#5915
passed
4 years ago
Stage: test
Stage: build
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
aleksis/core/settings.py
+3
-1
3 additions, 1 deletion
aleksis/core/settings.py
aleksis/core/tasks.py
+2
-3
2 additions, 3 deletions
aleksis/core/tasks.py
aleksis/core/views.py
+2
-4
2 additions, 4 deletions
aleksis/core/views.py
pyproject.toml
+3
-3
3 additions, 3 deletions
pyproject.toml
with
10 additions
and
11 deletions
aleksis/core/settings.py
+
3
−
1
View file @
54df673c
...
...
@@ -494,7 +494,9 @@ CELERY_BROKER_URL = _settings.get("celery.broker", "redis://localhost")
CELERY_RESULT_BACKEND
=
"
django-db
"
CELERY_CACHE_BACKEND
=
"
django-cache
"
CELERY_BEAT_SCHEDULER
=
"
django_celery_beat.schedulers:DatabaseScheduler
"
EMAIL_BACKEND
=
"
djcelery_email.backends.CeleryEmailBackend
"
if
_settings
.
get
(
"
celery.email
"
,
False
):
EMAIL_BACKEND
=
"
djcelery_email.backends.CeleryEmailBackend
"
PWA_APP_NAME
=
lazy_preference
(
"
general
"
,
"
title
"
)
PWA_APP_DESCRIPTION
=
lazy_preference
(
"
general
"
,
"
description
"
)
...
...
This diff is collapsed.
Click to expand it.
aleksis/core/tasks.py
+
2
−
3
View file @
54df673c
...
...
@@ -2,12 +2,11 @@ from django.conf import settings
from
django.core
import
management
from
.celery
import
app
from
.util.celery_progress
import
ProgressRecorder
from
.util.notifications
import
send_notification
as
_send_notification
@app.task
def
send_notification
(
notification
:
int
,
resend
:
bool
=
False
,
recorder
=
ProgressRecorder
)
->
None
:
def
send_notification
(
notification
:
int
,
resend
:
bool
=
False
)
->
None
:
"""
Send a notification object to its recipient.
:param notification: primary key of the notification object to send
...
...
@@ -17,7 +16,7 @@ def send_notification(notification: int, resend: bool = False, recorder=Progress
@app.task
def
backup_data
(
recorder
=
ProgressRecorder
)
->
None
:
def
backup_data
()
->
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.
aleksis/core/views.py
+
2
−
4
View file @
54df673c
...
...
@@ -17,6 +17,7 @@ from django.views.generic.detail import DetailView
from
django.views.generic.list
import
ListView
import
reversion
from
django_celery_results.models
import
TaskResult
from
django_tables2
import
RequestConfig
,
SingleTableView
from
dynamic_preferences.forms
import
preference_form_builder
from
guardian.shortcuts
import
get_objects_for_user
...
...
@@ -30,6 +31,7 @@ from rules.contrib.views import PermissionRequiredMixin, permission_required
from
aleksis.core.data_checks
import
DataCheckRegistry
,
check_data
from
.celery
import
app
from
.filters
import
GroupFilter
,
PersonFilter
from
.forms
import
(
AnnouncementForm
,
...
...
@@ -410,10 +412,6 @@ class SystemStatus(PermissionRequiredMixin, MainView):
status_code
=
500
if
self
.
errors
else
200
task_results
=
[]
from
django_celery_results.models
import
TaskResult
# noqa
from
.celery
import
app
# noqa
if
app
.
control
.
inspect
().
registered_tasks
():
job_list
=
list
(
app
.
control
.
inspect
().
registered_tasks
().
values
())[
0
]
for
job
in
job_list
:
...
...
This diff is collapsed.
Click to expand it.
pyproject.toml
+
3
−
3
View file @
54df673c
...
...
@@ -69,6 +69,9 @@ django-ckeditor = "^6.0.0"
django-js-reverse
=
"^0.9.1"
calendarweek
=
"^0.4.3"
Celery
=
{
version
=
"^5.0.0"
,
extras
=[
"django"
,
"redis"
]}
django-celery-results
=
"^2.0.1"
django-celery-beat
=
"^2.2.0"
django-celery-email
=
"^3.0.0"
django-jsonstore
=
"^0.5.0"
django-polymorphic
=
"^3.0.0"
django-colorfield
=
"^0.3.0"
...
...
@@ -93,9 +96,6 @@ django-model-utils = "^4.0.0"
bs4
=
"^0.0.1"
django-extensions
=
"^3.1.1"
ipython
=
"^7.20.0"
django-celery-results
=
"^2.0.1"
django-celery-beat
=
"^2.2.0"
django-celery-email
=
"^3.0.0"
[tool.poetry.extras]
ldap
=
[
"django-auth-ldap"
]
...
...
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