mirror of
https://github.com/seriousm4x/UpSnap.git
synced 2026-03-31 06:24:06 -04:00
18 lines
348 B
Python
18 lines
348 B
Python
import os
|
|
from celery import Celery
|
|
|
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_wol.settings")
|
|
|
|
app = Celery("dango_wol")
|
|
|
|
app.config_from_object("django.conf:settings", namespace="CELERY")
|
|
|
|
app.conf.beat_schedule = {
|
|
"ping_devices_5s": {
|
|
"task": "wol.tasks.status",
|
|
"schedule": 5
|
|
}
|
|
}
|
|
|
|
app.autodiscover_tasks()
|