taskcluster 93.0.0__tar.gz → 96.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {taskcluster-93.0.0 → taskcluster-96.0.0}/PKG-INFO +1 -1
- {taskcluster-93.0.0 → taskcluster-96.0.0}/pyproject.toml +1 -1
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/aio/queue.py +51 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/aio/queueevents.py +122 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/aio/workermanager.py +27 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/queue.py +49 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/queueevents.py +122 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/workermanager.py +27 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/uv.lock +357 -293
- {taskcluster-93.0.0 → taskcluster-96.0.0}/.gitignore +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/CODE_OF_CONDUCT.md +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/CONTRIBUTING.md +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/LICENSE +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/Makefile +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/README.md +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/lint.sh +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/release.sh +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/__init__.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/aio/__init__.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/aio/asyncclient.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/aio/asyncutils.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/aio/auth.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/aio/authevents.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/aio/awsprovisioner.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/aio/download.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/aio/ec2manager.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/aio/github.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/aio/githubevents.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/aio/hooks.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/aio/hooksevents.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/aio/index.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/aio/login.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/aio/notify.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/aio/notifyevents.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/aio/purgecache.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/aio/queue.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/aio/queueevents.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/aio/reader_writer.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/aio/retry.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/aio/secrets.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/aio/upload.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/aio/workermanager.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/aio/workermanagerevents.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/auth.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/authevents.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/awsprovisioner.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/client.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/download.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/ec2manager.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/exceptions.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/__init__.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/_client_importer.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/aio/__init__.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/aio/_client_importer.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/aio/auth.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/aio/authevents.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/aio/github.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/aio/githubevents.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/aio/hooks.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/aio/hooksevents.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/aio/index.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/aio/notify.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/aio/notifyevents.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/aio/object.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/aio/purgecache.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/aio/secrets.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/aio/workermanagerevents.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/auth.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/authevents.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/github.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/githubevents.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/hooks.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/hooksevents.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/index.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/notify.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/notifyevents.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/object.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/purgecache.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/secrets.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/generated/workermanagerevents.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/github.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/githubevents.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/helper.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/hooks.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/hooksevents.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/index.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/login.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/notify.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/notifyevents.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/purgecache.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/queue.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/queueevents.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/retry.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/secrets.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/upload.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/utils.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/workermanager.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/taskcluster/workermanagerevents.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/test/aio/__init__.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/test/aio/test_client.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/test/aio/test_reader_writer.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/test/aio/test_upload_download.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/test/aio/test_upload_download_real.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/test/base.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/test/conftest.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/test/public.key +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/test/secret.key +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/test/test_client.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/test/test_exceptions.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/test/test_imports.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/test/test_upload_download.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/test/test_upload_download_real.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/test/test_utils.py +0 -0
- {taskcluster-93.0.0 → taskcluster-96.0.0}/test.sh +0 -0
|
@@ -368,6 +368,39 @@ class Queue(AsyncBaseClient):
|
|
|
368
368
|
|
|
369
369
|
return await self._makeApiCall(self.funcinfo["cancelTask"], *args, **kwargs)
|
|
370
370
|
|
|
371
|
+
async def changeTaskPriority(self, *args, **kwargs):
|
|
372
|
+
"""
|
|
373
|
+
Change Task Priority
|
|
374
|
+
|
|
375
|
+
This method updates the priority of a single unresolved task.
|
|
376
|
+
|
|
377
|
+
* Claimed or running tasks keep their current run priority until they are retried.
|
|
378
|
+
* Emits `taskPriorityChanged` events so downstream tooling can observe manual overrides.
|
|
379
|
+
|
|
380
|
+
This method is ``experimental``
|
|
381
|
+
"""
|
|
382
|
+
|
|
383
|
+
return await self._makeApiCall(
|
|
384
|
+
self.funcinfo["changeTaskPriority"], *args, **kwargs
|
|
385
|
+
)
|
|
386
|
+
|
|
387
|
+
async def changeTaskGroupPriority(self, *args, **kwargs):
|
|
388
|
+
"""
|
|
389
|
+
Change Task Group Priority
|
|
390
|
+
|
|
391
|
+
This method applies a new priority to unresolved tasks within a task group.
|
|
392
|
+
|
|
393
|
+
* Updates run in bounded batches to avoid long locks.
|
|
394
|
+
* Claimed or running tasks keep their current run priority until they are retried.
|
|
395
|
+
* Emits `taskGroupPriorityChanged` summary event at the end.
|
|
396
|
+
|
|
397
|
+
This method is ``experimental``
|
|
398
|
+
"""
|
|
399
|
+
|
|
400
|
+
return await self._makeApiCall(
|
|
401
|
+
self.funcinfo["changeTaskGroupPriority"], *args, **kwargs
|
|
402
|
+
)
|
|
403
|
+
|
|
371
404
|
async def claimWork(self, *args, **kwargs):
|
|
372
405
|
"""
|
|
373
406
|
Claim Work
|
|
@@ -1051,6 +1084,24 @@ class Queue(AsyncBaseClient):
|
|
|
1051
1084
|
"route": "/task-group/<taskGroupId>/cancel",
|
|
1052
1085
|
"stability": "experimental",
|
|
1053
1086
|
},
|
|
1087
|
+
"changeTaskGroupPriority": {
|
|
1088
|
+
"args": ["taskGroupId"],
|
|
1089
|
+
"input": "v1/change-task-priority-request.json#",
|
|
1090
|
+
"method": "post",
|
|
1091
|
+
"name": "changeTaskGroupPriority",
|
|
1092
|
+
"output": "v1/task-group-priority-change-response.json#",
|
|
1093
|
+
"route": "/task-group/<taskGroupId>/priority",
|
|
1094
|
+
"stability": "experimental",
|
|
1095
|
+
},
|
|
1096
|
+
"changeTaskPriority": {
|
|
1097
|
+
"args": ["taskId"],
|
|
1098
|
+
"input": "v1/change-task-priority-request.json#",
|
|
1099
|
+
"method": "post",
|
|
1100
|
+
"name": "changeTaskPriority",
|
|
1101
|
+
"output": "v1/task-status-response.json#",
|
|
1102
|
+
"route": "/task/<taskId>/priority",
|
|
1103
|
+
"stability": "experimental",
|
|
1104
|
+
},
|
|
1054
1105
|
"claimTask": {
|
|
1055
1106
|
"args": ["taskId", "runId"],
|
|
1056
1107
|
"input": "v1/task-claim-request.json#",
|
|
@@ -758,6 +758,128 @@ class QueueEvents(AsyncBaseClient):
|
|
|
758
758
|
}
|
|
759
759
|
return self._makeTopicExchange(ref, *args, **kwargs)
|
|
760
760
|
|
|
761
|
+
def taskPriorityChanged(self, *args, **kwargs):
|
|
762
|
+
"""
|
|
763
|
+
Task Priority Changed Messages
|
|
764
|
+
|
|
765
|
+
A message published when task priority was updated via `changeTaskPriority` API call.
|
|
766
|
+
|
|
767
|
+
This exchange takes the following keys:
|
|
768
|
+
|
|
769
|
+
* routingKeyKind: Identifier for the routing-key kind. This is always `'primary'` for the formalized routing key. (required)
|
|
770
|
+
|
|
771
|
+
* taskId: `taskId` for the task this message concerns (required)
|
|
772
|
+
|
|
773
|
+
* runId: `runId` of latest run for the task, `_` if no run is exists for the task.
|
|
774
|
+
|
|
775
|
+
* workerGroup: `workerGroup` of latest run for the task, `_` if no run is exists for the task.
|
|
776
|
+
|
|
777
|
+
* workerId: `workerId` of latest run for the task, `_` if no run is exists for the task.
|
|
778
|
+
|
|
779
|
+
* provisionerId: `provisionerId` this task is targeted at. (required)
|
|
780
|
+
|
|
781
|
+
* workerType: `workerType` this task must run on. (required)
|
|
782
|
+
|
|
783
|
+
* schedulerId: `schedulerId` this task was created by. (required)
|
|
784
|
+
|
|
785
|
+
* taskGroupId: `taskGroupId` this task was created in. (required)
|
|
786
|
+
|
|
787
|
+
* reserved: Space reserved for future routing-key entries, you should always match this entry with `#`. As automatically done by our tooling, if not specified.
|
|
788
|
+
"""
|
|
789
|
+
|
|
790
|
+
ref = {
|
|
791
|
+
"exchange": "task-priority-changed",
|
|
792
|
+
"name": "taskPriorityChanged",
|
|
793
|
+
"routingKey": [
|
|
794
|
+
{
|
|
795
|
+
"constant": "primary",
|
|
796
|
+
"multipleWords": False,
|
|
797
|
+
"name": "routingKeyKind",
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
"multipleWords": False,
|
|
801
|
+
"name": "taskId",
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
"multipleWords": False,
|
|
805
|
+
"name": "runId",
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
"multipleWords": False,
|
|
809
|
+
"name": "workerGroup",
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
"multipleWords": False,
|
|
813
|
+
"name": "workerId",
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
"multipleWords": False,
|
|
817
|
+
"name": "provisionerId",
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
"multipleWords": False,
|
|
821
|
+
"name": "workerType",
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
"multipleWords": False,
|
|
825
|
+
"name": "schedulerId",
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
"multipleWords": False,
|
|
829
|
+
"name": "taskGroupId",
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
"multipleWords": True,
|
|
833
|
+
"name": "reserved",
|
|
834
|
+
},
|
|
835
|
+
],
|
|
836
|
+
"schema": "v1/task-priority-changed-message.json#",
|
|
837
|
+
}
|
|
838
|
+
return self._makeTopicExchange(ref, *args, **kwargs)
|
|
839
|
+
|
|
840
|
+
def taskGroupPriorityChanged(self, *args, **kwargs):
|
|
841
|
+
"""
|
|
842
|
+
Task Group Priority Changed Messages
|
|
843
|
+
|
|
844
|
+
A message published when task group priority was changed via `changeTaskGroupPriority` API call.
|
|
845
|
+
|
|
846
|
+
This exchange takes the following keys:
|
|
847
|
+
|
|
848
|
+
* routingKeyKind: Identifier for the routing-key kind. This is always `'primary'` for the formalized routing key. (required)
|
|
849
|
+
|
|
850
|
+
* taskGroupId: `taskGroupId` for the task-group this message concerns (required)
|
|
851
|
+
|
|
852
|
+
* schedulerId: `schedulerId` for the task-group this message concerns (required)
|
|
853
|
+
|
|
854
|
+
* reserved: Space reserved for future routing-key entries, you should always match this entry with `#`. As automatically done by our tooling, if not specified.
|
|
855
|
+
"""
|
|
856
|
+
|
|
857
|
+
ref = {
|
|
858
|
+
"exchange": "task-group-priority-changed",
|
|
859
|
+
"name": "taskGroupPriorityChanged",
|
|
860
|
+
"routingKey": [
|
|
861
|
+
{
|
|
862
|
+
"constant": "primary",
|
|
863
|
+
"multipleWords": False,
|
|
864
|
+
"name": "routingKeyKind",
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
"multipleWords": False,
|
|
868
|
+
"name": "taskGroupId",
|
|
869
|
+
},
|
|
870
|
+
{
|
|
871
|
+
"multipleWords": False,
|
|
872
|
+
"name": "schedulerId",
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
"multipleWords": True,
|
|
876
|
+
"name": "reserved",
|
|
877
|
+
},
|
|
878
|
+
],
|
|
879
|
+
"schema": "v1/task-group-priority-changed-message.json#",
|
|
880
|
+
}
|
|
881
|
+
return self._makeTopicExchange(ref, *args, **kwargs)
|
|
882
|
+
|
|
761
883
|
funcinfo = {}
|
|
762
884
|
|
|
763
885
|
|
|
@@ -310,6 +310,25 @@ class WorkerManager(AsyncBaseClient):
|
|
|
310
310
|
|
|
311
311
|
return await self._makeApiCall(self.funcinfo["removeWorker"], *args, **kwargs)
|
|
312
312
|
|
|
313
|
+
async def shouldWorkerTerminate(self, *args, **kwargs):
|
|
314
|
+
"""
|
|
315
|
+
Should worker terminate
|
|
316
|
+
|
|
317
|
+
Informs if worker should terminate or keep working.
|
|
318
|
+
Worker might no longer be needed based on the set of factors:
|
|
319
|
+
- current capacity of the worker pool
|
|
320
|
+
- amount of pending and claimed tasks
|
|
321
|
+
- launch configuration changes
|
|
322
|
+
|
|
323
|
+
Decision is made during provision or scanning loop based on above mentioned conditions.
|
|
324
|
+
|
|
325
|
+
This method is ``experimental``
|
|
326
|
+
"""
|
|
327
|
+
|
|
328
|
+
return await self._makeApiCall(
|
|
329
|
+
self.funcinfo["shouldWorkerTerminate"], *args, **kwargs
|
|
330
|
+
)
|
|
331
|
+
|
|
313
332
|
async def listWorkersForWorkerPool(self, *args, **kwargs):
|
|
314
333
|
"""
|
|
315
334
|
Workers in a Worker Pool
|
|
@@ -570,6 +589,14 @@ class WorkerManager(AsyncBaseClient):
|
|
|
570
589
|
"route": "/worker/reregister",
|
|
571
590
|
"stability": "experimental",
|
|
572
591
|
},
|
|
592
|
+
"shouldWorkerTerminate": {
|
|
593
|
+
"args": ["workerPoolId", "workerGroup", "workerId"],
|
|
594
|
+
"method": "get",
|
|
595
|
+
"name": "shouldWorkerTerminate",
|
|
596
|
+
"output": "v1/should-worker-terminate-response.json#",
|
|
597
|
+
"route": "/workers/<workerPoolId>/<workerGroup>/<workerId>/should-terminate",
|
|
598
|
+
"stability": "experimental",
|
|
599
|
+
},
|
|
573
600
|
"updateWorker": {
|
|
574
601
|
"args": ["workerPoolId", "workerGroup", "workerId"],
|
|
575
602
|
"input": "v1/create-worker-request.json#",
|
|
@@ -364,6 +364,37 @@ class Queue(BaseClient):
|
|
|
364
364
|
|
|
365
365
|
return self._makeApiCall(self.funcinfo["cancelTask"], *args, **kwargs)
|
|
366
366
|
|
|
367
|
+
def changeTaskPriority(self, *args, **kwargs):
|
|
368
|
+
"""
|
|
369
|
+
Change Task Priority
|
|
370
|
+
|
|
371
|
+
This method updates the priority of a single unresolved task.
|
|
372
|
+
|
|
373
|
+
* Claimed or running tasks keep their current run priority until they are retried.
|
|
374
|
+
* Emits `taskPriorityChanged` events so downstream tooling can observe manual overrides.
|
|
375
|
+
|
|
376
|
+
This method is ``experimental``
|
|
377
|
+
"""
|
|
378
|
+
|
|
379
|
+
return self._makeApiCall(self.funcinfo["changeTaskPriority"], *args, **kwargs)
|
|
380
|
+
|
|
381
|
+
def changeTaskGroupPriority(self, *args, **kwargs):
|
|
382
|
+
"""
|
|
383
|
+
Change Task Group Priority
|
|
384
|
+
|
|
385
|
+
This method applies a new priority to unresolved tasks within a task group.
|
|
386
|
+
|
|
387
|
+
* Updates run in bounded batches to avoid long locks.
|
|
388
|
+
* Claimed or running tasks keep their current run priority until they are retried.
|
|
389
|
+
* Emits `taskGroupPriorityChanged` summary event at the end.
|
|
390
|
+
|
|
391
|
+
This method is ``experimental``
|
|
392
|
+
"""
|
|
393
|
+
|
|
394
|
+
return self._makeApiCall(
|
|
395
|
+
self.funcinfo["changeTaskGroupPriority"], *args, **kwargs
|
|
396
|
+
)
|
|
397
|
+
|
|
367
398
|
def claimWork(self, *args, **kwargs):
|
|
368
399
|
"""
|
|
369
400
|
Claim Work
|
|
@@ -1021,6 +1052,24 @@ class Queue(BaseClient):
|
|
|
1021
1052
|
"route": "/task-group/<taskGroupId>/cancel",
|
|
1022
1053
|
"stability": "experimental",
|
|
1023
1054
|
},
|
|
1055
|
+
"changeTaskGroupPriority": {
|
|
1056
|
+
"args": ["taskGroupId"],
|
|
1057
|
+
"input": "v1/change-task-priority-request.json#",
|
|
1058
|
+
"method": "post",
|
|
1059
|
+
"name": "changeTaskGroupPriority",
|
|
1060
|
+
"output": "v1/task-group-priority-change-response.json#",
|
|
1061
|
+
"route": "/task-group/<taskGroupId>/priority",
|
|
1062
|
+
"stability": "experimental",
|
|
1063
|
+
},
|
|
1064
|
+
"changeTaskPriority": {
|
|
1065
|
+
"args": ["taskId"],
|
|
1066
|
+
"input": "v1/change-task-priority-request.json#",
|
|
1067
|
+
"method": "post",
|
|
1068
|
+
"name": "changeTaskPriority",
|
|
1069
|
+
"output": "v1/task-status-response.json#",
|
|
1070
|
+
"route": "/task/<taskId>/priority",
|
|
1071
|
+
"stability": "experimental",
|
|
1072
|
+
},
|
|
1024
1073
|
"claimTask": {
|
|
1025
1074
|
"args": ["taskId", "runId"],
|
|
1026
1075
|
"input": "v1/task-claim-request.json#",
|
|
@@ -758,6 +758,128 @@ class QueueEvents(BaseClient):
|
|
|
758
758
|
}
|
|
759
759
|
return self._makeTopicExchange(ref, *args, **kwargs)
|
|
760
760
|
|
|
761
|
+
def taskPriorityChanged(self, *args, **kwargs):
|
|
762
|
+
"""
|
|
763
|
+
Task Priority Changed Messages
|
|
764
|
+
|
|
765
|
+
A message published when task priority was updated via `changeTaskPriority` API call.
|
|
766
|
+
|
|
767
|
+
This exchange takes the following keys:
|
|
768
|
+
|
|
769
|
+
* routingKeyKind: Identifier for the routing-key kind. This is always `'primary'` for the formalized routing key. (required)
|
|
770
|
+
|
|
771
|
+
* taskId: `taskId` for the task this message concerns (required)
|
|
772
|
+
|
|
773
|
+
* runId: `runId` of latest run for the task, `_` if no run is exists for the task.
|
|
774
|
+
|
|
775
|
+
* workerGroup: `workerGroup` of latest run for the task, `_` if no run is exists for the task.
|
|
776
|
+
|
|
777
|
+
* workerId: `workerId` of latest run for the task, `_` if no run is exists for the task.
|
|
778
|
+
|
|
779
|
+
* provisionerId: `provisionerId` this task is targeted at. (required)
|
|
780
|
+
|
|
781
|
+
* workerType: `workerType` this task must run on. (required)
|
|
782
|
+
|
|
783
|
+
* schedulerId: `schedulerId` this task was created by. (required)
|
|
784
|
+
|
|
785
|
+
* taskGroupId: `taskGroupId` this task was created in. (required)
|
|
786
|
+
|
|
787
|
+
* reserved: Space reserved for future routing-key entries, you should always match this entry with `#`. As automatically done by our tooling, if not specified.
|
|
788
|
+
"""
|
|
789
|
+
|
|
790
|
+
ref = {
|
|
791
|
+
"exchange": "task-priority-changed",
|
|
792
|
+
"name": "taskPriorityChanged",
|
|
793
|
+
"routingKey": [
|
|
794
|
+
{
|
|
795
|
+
"constant": "primary",
|
|
796
|
+
"multipleWords": False,
|
|
797
|
+
"name": "routingKeyKind",
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
"multipleWords": False,
|
|
801
|
+
"name": "taskId",
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
"multipleWords": False,
|
|
805
|
+
"name": "runId",
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
"multipleWords": False,
|
|
809
|
+
"name": "workerGroup",
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
"multipleWords": False,
|
|
813
|
+
"name": "workerId",
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
"multipleWords": False,
|
|
817
|
+
"name": "provisionerId",
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
"multipleWords": False,
|
|
821
|
+
"name": "workerType",
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
"multipleWords": False,
|
|
825
|
+
"name": "schedulerId",
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
"multipleWords": False,
|
|
829
|
+
"name": "taskGroupId",
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
"multipleWords": True,
|
|
833
|
+
"name": "reserved",
|
|
834
|
+
},
|
|
835
|
+
],
|
|
836
|
+
"schema": "v1/task-priority-changed-message.json#",
|
|
837
|
+
}
|
|
838
|
+
return self._makeTopicExchange(ref, *args, **kwargs)
|
|
839
|
+
|
|
840
|
+
def taskGroupPriorityChanged(self, *args, **kwargs):
|
|
841
|
+
"""
|
|
842
|
+
Task Group Priority Changed Messages
|
|
843
|
+
|
|
844
|
+
A message published when task group priority was changed via `changeTaskGroupPriority` API call.
|
|
845
|
+
|
|
846
|
+
This exchange takes the following keys:
|
|
847
|
+
|
|
848
|
+
* routingKeyKind: Identifier for the routing-key kind. This is always `'primary'` for the formalized routing key. (required)
|
|
849
|
+
|
|
850
|
+
* taskGroupId: `taskGroupId` for the task-group this message concerns (required)
|
|
851
|
+
|
|
852
|
+
* schedulerId: `schedulerId` for the task-group this message concerns (required)
|
|
853
|
+
|
|
854
|
+
* reserved: Space reserved for future routing-key entries, you should always match this entry with `#`. As automatically done by our tooling, if not specified.
|
|
855
|
+
"""
|
|
856
|
+
|
|
857
|
+
ref = {
|
|
858
|
+
"exchange": "task-group-priority-changed",
|
|
859
|
+
"name": "taskGroupPriorityChanged",
|
|
860
|
+
"routingKey": [
|
|
861
|
+
{
|
|
862
|
+
"constant": "primary",
|
|
863
|
+
"multipleWords": False,
|
|
864
|
+
"name": "routingKeyKind",
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
"multipleWords": False,
|
|
868
|
+
"name": "taskGroupId",
|
|
869
|
+
},
|
|
870
|
+
{
|
|
871
|
+
"multipleWords": False,
|
|
872
|
+
"name": "schedulerId",
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
"multipleWords": True,
|
|
876
|
+
"name": "reserved",
|
|
877
|
+
},
|
|
878
|
+
],
|
|
879
|
+
"schema": "v1/task-group-priority-changed-message.json#",
|
|
880
|
+
}
|
|
881
|
+
return self._makeTopicExchange(ref, *args, **kwargs)
|
|
882
|
+
|
|
761
883
|
funcinfo = {}
|
|
762
884
|
|
|
763
885
|
|
|
@@ -292,6 +292,25 @@ class WorkerManager(BaseClient):
|
|
|
292
292
|
|
|
293
293
|
return self._makeApiCall(self.funcinfo["removeWorker"], *args, **kwargs)
|
|
294
294
|
|
|
295
|
+
def shouldWorkerTerminate(self, *args, **kwargs):
|
|
296
|
+
"""
|
|
297
|
+
Should worker terminate
|
|
298
|
+
|
|
299
|
+
Informs if worker should terminate or keep working.
|
|
300
|
+
Worker might no longer be needed based on the set of factors:
|
|
301
|
+
- current capacity of the worker pool
|
|
302
|
+
- amount of pending and claimed tasks
|
|
303
|
+
- launch configuration changes
|
|
304
|
+
|
|
305
|
+
Decision is made during provision or scanning loop based on above mentioned conditions.
|
|
306
|
+
|
|
307
|
+
This method is ``experimental``
|
|
308
|
+
"""
|
|
309
|
+
|
|
310
|
+
return self._makeApiCall(
|
|
311
|
+
self.funcinfo["shouldWorkerTerminate"], *args, **kwargs
|
|
312
|
+
)
|
|
313
|
+
|
|
295
314
|
def listWorkersForWorkerPool(self, *args, **kwargs):
|
|
296
315
|
"""
|
|
297
316
|
Workers in a Worker Pool
|
|
@@ -550,6 +569,14 @@ class WorkerManager(BaseClient):
|
|
|
550
569
|
"route": "/worker/reregister",
|
|
551
570
|
"stability": "experimental",
|
|
552
571
|
},
|
|
572
|
+
"shouldWorkerTerminate": {
|
|
573
|
+
"args": ["workerPoolId", "workerGroup", "workerId"],
|
|
574
|
+
"method": "get",
|
|
575
|
+
"name": "shouldWorkerTerminate",
|
|
576
|
+
"output": "v1/should-worker-terminate-response.json#",
|
|
577
|
+
"route": "/workers/<workerPoolId>/<workerGroup>/<workerId>/should-terminate",
|
|
578
|
+
"stability": "experimental",
|
|
579
|
+
},
|
|
553
580
|
"updateWorker": {
|
|
554
581
|
"args": ["workerPoolId", "workerGroup", "workerId"],
|
|
555
582
|
"input": "v1/create-worker-request.json#",
|