1+ from __future__ import annotations
12import logging
23import threading
34import uuid
@@ -303,6 +304,7 @@ def submit_job(
303304 auto_disconnect_on_result : bool ,
304305 job_reference : Optional [str ] = None ,
305306 auto_cleanup_after_ttl : Optional [timedelta ] = JOB_QUEUES_TTL ,
307+ job_priority : Union [JobSubmission .JobPriority , int ] = JobSubmission .JobPriority .MEDIUM ,
306308 ) -> Job :
307309 """Submit a new job and connect to progress and status updates and the job result.
308310
@@ -322,6 +324,7 @@ def submit_job(
322324 `callback_on_finished`.
323325 :param job_reference: An optional reference to the submitted job which is used in the
324326 name of the output ESDL as well as in internal logging of OMOTES.
327+ :param job_priority: An optional priority value for the job used in celery.
325328 :param auto_cleanup_after_ttl: When erroneous situations occur (e.g. client is offline),
326329 all queues pertaining to this job will be removed after the given TTL.
327330 Default to 48 hours if unset. Set to `None` to turn off auto clean up,
@@ -362,6 +365,7 @@ def submit_job(
362365 esdl = esdl ,
363366 params_dict = convert_params_dict_to_struct (workflow_type , params_dict ),
364367 job_reference = job_reference ,
368+ job_priority = job_priority , # type: ignore [arg-type]
365369 )
366370 self .broker_if .send_message_to (
367371 exchange_name = OmotesQueueNames .omotes_exchange_name (),
0 commit comments