Skip to content
Snippets Groups Projects
Commit e96b1a64 authored by Valentin Rigal's avatar Valentin Rigal
Browse files

Allow to override default tasks scheduler

parent 33469256
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !2233. Comments created here will be created in the context of that merge request.
......@@ -10,6 +10,7 @@ from django.db.models import F, Q
from django.urls import reverse
from django.utils import timezone
from django.utils.functional import cached_property
from django.utils.module_loading import cached_import
from enumfields import Enum, EnumField
import pgtrigger
......@@ -390,7 +391,7 @@ class Process(IndexableModel):
"""
Build and start a new run for this process.
"""
from arkindex.project.triggers import schedule_tasks
schedule_tasks = cached_import(*settings.SCHEDULED_TASKS_TRIGGER)
process_builder = ProcessBuilder(self)
process_builder.validate()
......
......@@ -657,4 +657,6 @@ if SENTRY_DSN and not DJANGO_SHELL:
TASK_AGENT_SERIALIZER = ("arkindex.project.serializer_fields", "NullField")
TASK_GPU_SERIALIZER = ("arkindex.project.serializer_fields", "NullField")
PROCESS_FARM_SERIALIZER = ("arkindex.project.serializer_fields", "NullField")
# Ponos specific implementations
GET_DEFAULT_FARM = ("arkindex.process.utils", "get_default_farm")
SCHEDULED_TASKS_TRIGGER = ("arkindex.project.triggers", "schedule_tasks")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment