Skip to content

Commit

Permalink
Add Task priority to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
catileptic committed Dec 7, 2023
1 parent 34d7e18 commit aec3997
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/support.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import uuid
from tempfile import mkdtemp
from ftmstore import get_dataset
from random import randrange

from servicelayer.archive import init_archive
from servicelayer.taskqueue import Task
Expand Down Expand Up @@ -39,6 +40,7 @@ def setUp(self):
ftmstore_settings.DATABASE_URI = "sqlite://"
dataset = get_dataset("test", origin=OP_INGEST)
Tags("ingest_cache").delete()
priority = randrange(1, service_settings.RABBITMQ_MAX_PRIORITY + 1)
task = Task(
task_id=uuid.uuid4().hex,
job_id=uuid.uuid4().hex,
Expand All @@ -47,6 +49,7 @@ def setUp(self):
delivery_tag="",
context={},
payload={},
priority=priority,
)
self.manager = Manager(dataset, task)
self.manager.entities = []
Expand Down

0 comments on commit aec3997

Please sign in to comment.