orchestrator-core 4.4.0rc3__py3-none-any.whl → 4.4.2__py3-none-any.whl
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.
- orchestrator/__init__.py +1 -1
- orchestrator/api/api_v1/endpoints/processes.py +2 -0
- orchestrator/graphql/schemas/process.py +2 -2
- orchestrator/graphql/schemas/workflow.py +2 -2
- orchestrator/schedules/scheduler.py +6 -7
- orchestrator/services/processes.py +1 -0
- {orchestrator_core-4.4.0rc3.dist-info → orchestrator_core-4.4.2.dist-info}/METADATA +1 -1
- {orchestrator_core-4.4.0rc3.dist-info → orchestrator_core-4.4.2.dist-info}/RECORD +10 -10
- {orchestrator_core-4.4.0rc3.dist-info → orchestrator_core-4.4.2.dist-info}/WHEEL +0 -0
- {orchestrator_core-4.4.0rc3.dist-info → orchestrator_core-4.4.2.dist-info}/licenses/LICENSE +0 -0
orchestrator/__init__.py
CHANGED
|
@@ -244,6 +244,8 @@ def continue_awaiting_process_endpoint(
|
|
|
244
244
|
continue_awaiting_process(process, token=token, input_data=json_data, broadcast_func=broadcast_func)
|
|
245
245
|
except AssertionError as e:
|
|
246
246
|
raise_status(HTTPStatus.NOT_FOUND, str(e))
|
|
247
|
+
except ValueError as e:
|
|
248
|
+
raise_status(HTTPStatus.BAD_REQUEST, str(e))
|
|
247
249
|
|
|
248
250
|
|
|
249
251
|
@router.post(
|
|
@@ -82,8 +82,8 @@ class ProcessType:
|
|
|
82
82
|
)
|
|
83
83
|
|
|
84
84
|
@strawberry.field(description="Returns user permissions for operations on this process") # type: ignore
|
|
85
|
-
def user_permissions(self, info: OrchestratorInfo) -> FormUserPermissionsType:
|
|
86
|
-
oidc_user = info.context.get_current_user
|
|
85
|
+
async def user_permissions(self, info: OrchestratorInfo) -> FormUserPermissionsType:
|
|
86
|
+
oidc_user = await info.context.get_current_user
|
|
87
87
|
workflow = get_workflow(self.workflow_name)
|
|
88
88
|
process = load_process(db.session.get(ProcessTable, self.process_id)) # type: ignore[arg-type]
|
|
89
89
|
auth_resume, auth_retry = get_auth_callbacks(get_steps_to_evaluate_for_rbac(process), workflow) # type: ignore[arg-type]
|
|
@@ -33,8 +33,8 @@ class Workflow:
|
|
|
33
33
|
return [Step(name=step.name, assignee=step.assignee) for step in get_workflow(self.name).steps] # type: ignore
|
|
34
34
|
|
|
35
35
|
@strawberry.field(description="Return whether the currently logged-in used is allowed to start this workflow") # type: ignore
|
|
36
|
-
def is_allowed(self, info: OrchestratorInfo) -> bool:
|
|
37
|
-
oidc_user = info.context.get_current_user
|
|
36
|
+
async def is_allowed(self, info: OrchestratorInfo) -> bool:
|
|
37
|
+
oidc_user = await info.context.get_current_user
|
|
38
38
|
workflow_table = get_original_model(self, WorkflowTable)
|
|
39
39
|
workflow = get_workflow(workflow_table.name)
|
|
40
40
|
|
|
@@ -29,7 +29,6 @@ from orchestrator.db.sorting.sorting import SortOrder
|
|
|
29
29
|
from orchestrator.settings import app_settings
|
|
30
30
|
from orchestrator.utils.helpers import camel_to_snake, to_camel
|
|
31
31
|
|
|
32
|
-
jobstores = {"default": SQLAlchemyJobStore(url=str(app_settings.DATABASE_URI))}
|
|
33
32
|
executors = {
|
|
34
33
|
"default": ThreadPoolExecutor(1),
|
|
35
34
|
}
|
|
@@ -37,22 +36,22 @@ job_defaults = {
|
|
|
37
36
|
"coalesce": True,
|
|
38
37
|
}
|
|
39
38
|
|
|
40
|
-
scheduler = BackgroundScheduler(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
def scheduler_dispose_db_connections() -> None:
|
|
44
|
-
jobstores["default"].engine.dispose()
|
|
39
|
+
scheduler = BackgroundScheduler(executors=executors, job_defaults=job_defaults)
|
|
45
40
|
|
|
46
41
|
|
|
47
42
|
@contextmanager
|
|
48
43
|
def get_paused_scheduler() -> Generator[BackgroundScheduler, Any, None]:
|
|
44
|
+
try:
|
|
45
|
+
scheduler.add_jobstore(SQLAlchemyJobStore(url=str(app_settings.DATABASE_URI)))
|
|
46
|
+
except ValueError:
|
|
47
|
+
pass
|
|
49
48
|
scheduler.start(paused=True)
|
|
50
49
|
|
|
51
50
|
try:
|
|
52
51
|
yield scheduler
|
|
53
52
|
finally:
|
|
54
53
|
scheduler.shutdown()
|
|
55
|
-
|
|
54
|
+
scheduler._jobstores["default"].engine.dispose()
|
|
56
55
|
|
|
57
56
|
|
|
58
57
|
class ScheduledTask(BaseModel):
|
|
@@ -524,6 +524,7 @@ def restart_process(
|
|
|
524
524
|
RESUMABLE_STATUSES = (
|
|
525
525
|
ProcessStatus.SUSPENDED, # Can be resumed
|
|
526
526
|
ProcessStatus.WAITING, # Can be retried
|
|
527
|
+
ProcessStatus.AWAITING_CALLBACK, # Can be resumed
|
|
527
528
|
ProcessStatus.FAILED, # Can be retried
|
|
528
529
|
ProcessStatus.API_UNAVAILABLE, # subtype of FAILED
|
|
529
530
|
ProcessStatus.INCONSISTENT_DATA, # subtype of FAILED
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
orchestrator/__init__.py,sha256=
|
|
1
|
+
orchestrator/__init__.py,sha256=4uQUvXQsc7ZhtqX56K_xiz86ujWkznNh0wuJWqYSuj8,1063
|
|
2
2
|
orchestrator/app.py,sha256=7UrXKjBKNSEaSSXAd5ww_RdMFhFqE4yvfj8faS2MzAA,12089
|
|
3
3
|
orchestrator/exception_handlers.py,sha256=UsW3dw8q0QQlNLcV359bIotah8DYjMsj2Ts1LfX4ClY,1268
|
|
4
4
|
orchestrator/log_config.py,sha256=1tPRX5q65e57a6a_zEii_PFK8SzWT0mnA5w2sKg4hh8,1853
|
|
@@ -17,7 +17,7 @@ orchestrator/api/api_v1/__init__.py,sha256=GyHNfEFCGKQwRiN6rQmvSRH2iYX7npjMZn97n
|
|
|
17
17
|
orchestrator/api/api_v1/api.py,sha256=m4iDktsSpzxUDaudkdgXeZ83a6B4wfc3pczQsa-Pb-8,2866
|
|
18
18
|
orchestrator/api/api_v1/endpoints/__init__.py,sha256=GyHNfEFCGKQwRiN6rQmvSRH2iYX7npjMZn97n8XzmLU,571
|
|
19
19
|
orchestrator/api/api_v1/endpoints/health.py,sha256=iaxs1XX1_250_gKNsspuULCV2GEMBjbtjsmfQTOvMAI,1284
|
|
20
|
-
orchestrator/api/api_v1/endpoints/processes.py,sha256=
|
|
20
|
+
orchestrator/api/api_v1/endpoints/processes.py,sha256=OVbt6FgFnJ4aHaYGIg0cPoim8mxDpdzJ4TGAyfB_kPw,16269
|
|
21
21
|
orchestrator/api/api_v1/endpoints/product_blocks.py,sha256=kZ6ywIOsS_S2qGq7RvZ4KzjvaS1LmwbGWR37AKRvWOw,2146
|
|
22
22
|
orchestrator/api/api_v1/endpoints/products.py,sha256=BfFtwu9dZXEQbtKxYj9icc73GKGvAGMR5ytyf41nQlQ,3081
|
|
23
23
|
orchestrator/api/api_v1/endpoints/resource_types.py,sha256=gGyuaDyOD0TAVoeFGaGmjDGnQ8eQQArOxKrrk4MaDzA,2145
|
|
@@ -185,7 +185,7 @@ orchestrator/graphql/schemas/customer_description.py,sha256=fize71IMpkvk_rTzcqCY
|
|
|
185
185
|
orchestrator/graphql/schemas/errors.py,sha256=VRl-Zd1FHMnscyozhfxzqeEUZ0ERAWum_Y8YwjGxwmA,203
|
|
186
186
|
orchestrator/graphql/schemas/fixed_input.py,sha256=1yqYHADQRgHz8OIP7ObYsPFS-gmzfkCvEO0a-KKf7zI,513
|
|
187
187
|
orchestrator/graphql/schemas/helpers.py,sha256=Kpj4kIbmoKKN35bdgUSwQvGUIbeg7VJAVMEq65YS_ik,346
|
|
188
|
-
orchestrator/graphql/schemas/process.py,sha256=
|
|
188
|
+
orchestrator/graphql/schemas/process.py,sha256=wN4pKDuPbPHyyfGYaqFXMXxKTDm_zIwmyCOhSu5H1Iw,4978
|
|
189
189
|
orchestrator/graphql/schemas/product.py,sha256=vUCqcjrKBJj-VKSrMYPKzjmmxLMXL7alKTJ8UdUkhTg,4342
|
|
190
190
|
orchestrator/graphql/schemas/product_block.py,sha256=Qk9cbA6vm7ZPrhdgPHatKRuy6TytBmxSr97McEOxAu8,2860
|
|
191
191
|
orchestrator/graphql/schemas/resource_type.py,sha256=s5d_FwQXL2-Sc-IDUxTJun5qFQ4zOP4-XcHF9ql-t1g,898
|
|
@@ -194,7 +194,7 @@ orchestrator/graphql/schemas/settings.py,sha256=drhm5VcLmUbiYAk6WUSJcyJqjNM96E6G
|
|
|
194
194
|
orchestrator/graphql/schemas/strawberry_pydantic_patch.py,sha256=CjNUhTKdYmLiaem-WY_mzw4HASIeaZitxGF8pPocqVw,1602
|
|
195
195
|
orchestrator/graphql/schemas/subscription.py,sha256=hTA34C27kgLguH9V53173CxMKIWiQKh3vFzyJ2yBfE0,9918
|
|
196
196
|
orchestrator/graphql/schemas/version.py,sha256=HSzVg_y4Sjd5_H5rRUtu3FJKOG_8ifhvBNt_qjOtC-E,92
|
|
197
|
-
orchestrator/graphql/schemas/workflow.py,sha256=
|
|
197
|
+
orchestrator/graphql/schemas/workflow.py,sha256=ewE5mRuqMq7rnx8Au2eTUm3YTY1pivOWATNacZQ-trY,1773
|
|
198
198
|
orchestrator/graphql/utils/__init__.py,sha256=1JvenzEVW1CBa1sGVI9I8IWnnoXIkb1hneDqph9EEZY,524
|
|
199
199
|
orchestrator/graphql/utils/create_resolver_error_handler.py,sha256=XzCnL482M4wz3fg5fUdGUwCAuzSZQ9Ufu1mscLyeoWU,1227
|
|
200
200
|
orchestrator/graphql/utils/get_query_loaders.py,sha256=abS_HJ7K9een78gMiGq3IhwGwxQXHvZygExe0h_t9ns,815
|
|
@@ -249,7 +249,7 @@ orchestrator/migrations/versions/schema/2025-07-04_4b58e336d1bf_deprecating_work
|
|
|
249
249
|
orchestrator/migrations/versions/schema/2025-07-28_850dccac3b02_update_description_of_resume_workflows_.py,sha256=R6Qoga83DJ1IL0WYPu0u5u2ZvAmqGlDmUMv_KtJyOhQ,812
|
|
250
250
|
orchestrator/schedules/__init__.py,sha256=Zy0fTOBMGIRFoh5iVFDLF9_PRAFaONYDThGK9EsysWo,981
|
|
251
251
|
orchestrator/schedules/resume_workflows.py,sha256=jRnVRWDy687pQu-gtk80ecwiLSdrvtL15tG3U2zWA6I,891
|
|
252
|
-
orchestrator/schedules/scheduler.py,sha256=
|
|
252
|
+
orchestrator/schedules/scheduler.py,sha256=nnuehZnBbtC90MsFP_Q6kqcD1ihsq08vr1ALJ6jHF_s,5833
|
|
253
253
|
orchestrator/schedules/scheduling.py,sha256=_mbpHMhijey8Y56ebtJ4wVkrp_kPVRm8hoByzlQF4SE,2821
|
|
254
254
|
orchestrator/schedules/task_vacuum.py,sha256=mxb7fsy1GphRwvUWi_lvwNaj51YAXUdIDlkOJd90AFI,874
|
|
255
255
|
orchestrator/schedules/validate_products.py,sha256=zWFQeVn3F8LP3joExLiKdmHs008pZsO-RolcIXHjFyE,1322
|
|
@@ -270,7 +270,7 @@ orchestrator/services/__init__.py,sha256=GyHNfEFCGKQwRiN6rQmvSRH2iYX7npjMZn97n8X
|
|
|
270
270
|
orchestrator/services/fixed_inputs.py,sha256=kyz7s2HLzyDulvcq-ZqefTw1om86COvyvTjz0_5CmgI,876
|
|
271
271
|
orchestrator/services/input_state.py,sha256=6BZOpb3cHpO18K-XG-3QUIV9pIM25_ufdODrp5CmXG4,2390
|
|
272
272
|
orchestrator/services/process_broadcast_thread.py,sha256=D44YbjF8mRqGuznkRUV4SoRn1J0lfy_x1H508GnSVlU,4649
|
|
273
|
-
orchestrator/services/processes.py,sha256=
|
|
273
|
+
orchestrator/services/processes.py,sha256=V-BHR8-9qw5cFHRuBJK8UkRQgCwQxFQbOnnwpKzJm0o,30599
|
|
274
274
|
orchestrator/services/products.py,sha256=BP4KyE8zO-8z7Trrs5T6zKBOw53S9BfBJnHWI3p6u5Y,1943
|
|
275
275
|
orchestrator/services/resource_types.py,sha256=_QBy_JOW_X3aSTqH0CuLrq4zBJL0p7Q-UDJUcuK2_qc,884
|
|
276
276
|
orchestrator/services/settings.py,sha256=HEWfFulgoEDwgfxGEO__QTr5fDiwNBEj1UhAeTAdbLQ,3159
|
|
@@ -319,7 +319,7 @@ orchestrator/workflows/tasks/resume_workflows.py,sha256=T3iobSJjVgiupe0rClD34kUZ
|
|
|
319
319
|
orchestrator/workflows/tasks/validate_product_type.py,sha256=paG-NAY1bdde3Adt8zItkcBKf5Pxw6f5ngGW6an6dYU,3192
|
|
320
320
|
orchestrator/workflows/tasks/validate_products.py,sha256=GZJBoFF-WMphS7ghMs2-gqvV2iL1F0POhk0uSNt93n0,8510
|
|
321
321
|
orchestrator/workflows/translations/en-GB.json,sha256=ST53HxkphFLTMjFHonykDBOZ7-P_KxksktZU3GbxLt0,846
|
|
322
|
-
orchestrator_core-4.4.
|
|
323
|
-
orchestrator_core-4.4.
|
|
324
|
-
orchestrator_core-4.4.
|
|
325
|
-
orchestrator_core-4.4.
|
|
322
|
+
orchestrator_core-4.4.2.dist-info/licenses/LICENSE,sha256=b-aA5OZQuuBATmLKo_mln8CQrDPPhg3ghLzjPjLn4Tg,11409
|
|
323
|
+
orchestrator_core-4.4.2.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
324
|
+
orchestrator_core-4.4.2.dist-info/METADATA,sha256=d_eBH7IDJyDV0WlfpxwHzzriuKoGhUAm7A5hxDvGi5o,5964
|
|
325
|
+
orchestrator_core-4.4.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|