@@ -206,7 +206,7 @@ def get( # pylint: disable=too-many-positional-arguments
206
206
not match exactly one object.
207
207
"""
208
208
if id :
209
- return _fetch (job_id = id )
209
+ return _fetch_by_id (job_id = id )
210
210
211
211
return get_all (
212
212
name_like = name_like ,
@@ -225,7 +225,7 @@ def get( # pylint: disable=too-many-positional-arguments
225
225
).try_unique_match ()
226
226
227
227
228
- def _fetch (job_id : UUID | str ) -> JobRef :
228
+ def _fetch_by_id (job_id : UUID | str ) -> JobRef :
229
229
"""Utility method for fetching directly by a unique identifier."""
230
230
res = get_nexus_client ().get (f"/api/jobs/v1beta/{ job_id } " )
231
231
@@ -376,13 +376,17 @@ def retry_submission(
376
376
job : JobRef ,
377
377
retry_status : list [StatusEnum ] | None = None ,
378
378
remote_retry_strategy : RemoteRetryStrategy = RemoteRetryStrategy .DEFAULT ,
379
+ user_group : str | None = None ,
379
380
):
380
381
"""Retry a job in Nexus according to status(es) or retry strategy.
381
382
382
383
By default, jobs with the ERROR status will be retried.
383
384
"""
384
385
body : dict [str , str | list [str ]] = {"remote_retry_strategy" : remote_retry_strategy }
385
386
387
+ if user_group is not None :
388
+ body ["user_group" ] = user_group
389
+
386
390
if retry_status is not None :
387
391
body ["retry_status" ] = [status .name for status in retry_status ]
388
392
@@ -418,6 +422,7 @@ def compile( # pylint: disable=redefined-builtin, too-many-positional-arguments
418
422
properties : PropertiesDict | None = None ,
419
423
optimisation_level : int = 2 ,
420
424
credential_name : str | None = None ,
425
+ user_group : str | None = None ,
421
426
hypertket_config : HyperTketConfig | None = None ,
422
427
timeout : float | None = 300.0 ,
423
428
) -> DataframableList [CircuitRef ]:
@@ -437,6 +442,7 @@ def compile( # pylint: disable=redefined-builtin, too-many-positional-arguments
437
442
properties = properties ,
438
443
optimisation_level = optimisation_level ,
439
444
credential_name = credential_name ,
445
+ user_group = user_group ,
440
446
hypertket_config = hypertket_config ,
441
447
)
442
448
@@ -465,6 +471,7 @@ def execute( # pylint: disable=too-many-locals, too-many-positional-arguments
465
471
language : Language = Language .AUTO ,
466
472
seed : int | None = None ,
467
473
credential_name : str | None = None ,
474
+ user_group : str | None = None ,
468
475
timeout : float | None = 300.0 ,
469
476
) -> list [BackendResult ]:
470
477
"""
@@ -489,6 +496,7 @@ def execute( # pylint: disable=too-many-locals, too-many-positional-arguments
489
496
language = language ,
490
497
seed = seed ,
491
498
credential_name = credential_name ,
499
+ user_group = user_group ,
492
500
)
493
501
494
502
wait_for (job = execute_job_ref , timeout = timeout )
0 commit comments