kopia lustrzana https://github.com/OpenDroneMap/WebODM
37 wiersze
832 B
Python
37 wiersze
832 B
Python
from celery import Celery
|
|
import os
|
|
|
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'webodm.settings')
|
|
|
|
app = Celery('tasks')
|
|
app.config_from_object('django.conf:settings', namespace='CELERY')
|
|
|
|
app.conf.beat_schedule = {
|
|
'update-nodes-info': {
|
|
'task': 'worker.tasks.update_nodes_info',
|
|
'schedule': 30,
|
|
'options': {
|
|
'expires': 14,
|
|
'retry': False
|
|
}
|
|
},
|
|
'cleanup-projects': {
|
|
'task': 'worker.tasks.cleanup_projects',
|
|
'schedule': 60,
|
|
'options': {
|
|
'expires': 29,
|
|
'retry': False
|
|
}
|
|
},
|
|
'process-pending-tasks': {
|
|
'task': 'worker.tasks.process_pending_tasks',
|
|
'schedule': 5,
|
|
'options': {
|
|
'expires': 2,
|
|
'retry': False
|
|
}
|
|
},
|
|
}
|
|
|
|
if __name__ == '__main__':
|
|
app.start() |