orchestrator-core 4.3.0rc3__tar.gz → 4.4.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.
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/PKG-INFO +2 -2
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/__init__.py +1 -1
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/api/api_v1/endpoints/processes.py +12 -6
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/api/api_v1/endpoints/subscriptions.py +1 -0
- orchestrator_core-4.4.0/orchestrator/cli/scheduler.py +68 -0
- orchestrator_core-4.4.0/orchestrator/graphql/resolvers/scheduled_tasks.py +36 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/schema.py +5 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/schemas/process.py +4 -4
- orchestrator_core-4.4.0/orchestrator/graphql/schemas/scheduled_task.py +8 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/schemas/workflow.py +2 -2
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/utils/create_resolver_error_handler.py +1 -1
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/schedules/__init__.py +1 -2
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/schedules/resume_workflows.py +2 -2
- orchestrator_core-4.4.0/orchestrator/schedules/scheduler.py +170 -0
- orchestrator_core-4.4.0/orchestrator/schedules/scheduling.py +88 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/schedules/task_vacuum.py +2 -2
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/schedules/validate_products.py +8 -2
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/schedules/validate_subscriptions.py +2 -2
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/services/processes.py +16 -11
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/services/subscriptions.py +4 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/targets.py +1 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/workflow.py +8 -1
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/workflows/utils.py +48 -1
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/pyproject.toml +5 -1
- orchestrator_core-4.3.0rc3/orchestrator/cli/scheduler.py +0 -62
- orchestrator_core-4.3.0rc3/orchestrator/schedules/scheduling.py +0 -48
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/LICENSE +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/README.md +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/api/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/api/api_v1/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/api/api_v1/api.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/api/api_v1/endpoints/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/api/api_v1/endpoints/health.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/api/api_v1/endpoints/product_blocks.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/api/api_v1/endpoints/products.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/api/api_v1/endpoints/resource_types.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/api/api_v1/endpoints/settings.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/api/api_v1/endpoints/subscription_customer_descriptions.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/api/api_v1/endpoints/translations.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/api/api_v1/endpoints/user.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/api/api_v1/endpoints/workflows.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/api/api_v1/endpoints/ws.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/api/error_handling.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/api/helpers.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/api/models.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/app.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/database.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/domain_gen_helpers/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/domain_gen_helpers/fixed_input_helpers.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/domain_gen_helpers/helpers.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/domain_gen_helpers/product_block_helpers.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/domain_gen_helpers/product_helpers.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/domain_gen_helpers/resource_type_helpers.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/domain_gen_helpers/types.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generate.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/custom_templates/README +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/custom_templates/additional_create_imports.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/custom_templates/additional_create_input_fields.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/custom_templates/additional_create_steps.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/custom_templates/additional_modify_imports.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/custom_templates/additional_modify_input_fields.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/custom_templates/additional_modify_steps.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/custom_templates/additional_terminate_imports.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/custom_templates/additional_terminate_input_fields.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/custom_templates/additional_terminate_steps.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/generator/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/generator/enums.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/generator/helpers.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/generator/migration.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/generator/product.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/generator/product_block.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/generator/settings.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/generator/translations.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/generator/unittest.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/generator/validations.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/generator/workflow.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/products/workshop/circuit.yaml +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/products/workshop/node.yaml +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/products/workshop/user.yaml +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/products/workshop/user_group.yaml +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/templates/additional_create_imports.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/templates/additional_create_steps.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/templates/additional_modify_imports.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/templates/additional_modify_steps.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/templates/additional_terminate_steps.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/templates/constrained_int_definitions.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/templates/create_data_head.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/templates/create_product.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/templates/enums.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/templates/lazy_workflow_instance.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/templates/list_definitions.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/templates/macros.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/templates/modify_product.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/templates/new_product_migration.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/templates/product.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/templates/product_block.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/templates/shared_forms.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/templates/shared_workflows.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/templates/subscription_model_registry.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/templates/terminate_product.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/templates/test_create_workflow.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/templates/test_modify_workflow.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/templates/test_product_type.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/templates/test_terminate_workflow.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/templates/test_validate_workflow.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/generator/templates/validate_product.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/helpers/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/helpers/input_helpers.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/helpers/print_helpers.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/main.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/migrate_domain_models.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/migrate_tasks.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/migrate_workflows.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/cli/migration_helpers.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/config/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/config/assignee.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/database.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/filters/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/filters/filters.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/filters/process.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/filters/product.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/filters/product_block.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/filters/resource_type.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/filters/search_filters/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/filters/search_filters/inferred_filter.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/filters/subscription.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/filters/workflow.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/helpers.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/listeners.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/loaders.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/models.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/queries/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/queries/subscription.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/queries/subscription_instance.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/range/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/range/range.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/sorting/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/sorting/process.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/sorting/product.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/sorting/product_block.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/sorting/resource_type.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/sorting/sorting.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/sorting/subscription.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/db/sorting/workflow.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/devtools/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/devtools/populator.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/devtools/scripts/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/devtools/scripts/migrate_20.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/devtools/scripts/migrate_30.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/devtools/scripts/shared.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/distlock/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/distlock/distlock_manager.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/distlock/managers/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/distlock/managers/memory_distlock_manager.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/distlock/managers/redis_distlock_manager.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/domain/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/domain/base.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/domain/context_cache.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/domain/customer_description.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/domain/helpers.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/domain/lifecycle.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/domain/subscription_instance_transform.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/exception_handlers.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/forms/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/forms/validators/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/forms/validators/customer_contact_list.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/forms/validators/customer_id.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/forms/validators/display_subscription.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/forms/validators/network_type_validators.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/forms/validators/product_id.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/autoregistration.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/extensions/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/extensions/model_cache.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/extensions/stats.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/loaders/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/loaders/subscriptions.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/mutations/customer_description.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/mutations/start_process.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/pagination.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/resolvers/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/resolvers/customer.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/resolvers/helpers.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/resolvers/process.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/resolvers/product.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/resolvers/product_block.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/resolvers/resource_type.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/resolvers/settings.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/resolvers/subscription.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/resolvers/version.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/resolvers/workflow.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/schemas/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/schemas/customer.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/schemas/customer_description.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/schemas/errors.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/schemas/fixed_input.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/schemas/helpers.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/schemas/product.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/schemas/product_block.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/schemas/resource_type.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/schemas/settings.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/schemas/strawberry_pydantic_patch.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/schemas/subscription.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/schemas/version.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/types.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/utils/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/utils/get_query_loaders.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/utils/get_selected_fields.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/utils/get_selected_paths.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/utils/get_subscription_product_blocks.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/utils/is_query_detailed.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/utils/override_class.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/utils/to_graphql_result_page.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/log_config.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/metrics/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/metrics/engine.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/metrics/init.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/metrics/processes.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/metrics/subscriptions.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/README +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/alembic.ini +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/env.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/helpers.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/script.py.mako +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/templates/alembic.ini.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/templates/env.py.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/templates/helpers.py.j2 +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2020-10-19_3323bcb934e7_fix_tsv_triggers.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2020-10-19_a76b9185b334_add_generic_workflows_to_core.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2020-10-19_c112305b07d3_initial_schema_migration.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2021-04-06_3c8b9185c221_add_validate_products_task.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2021-07-01_6896a54e9483_add_product_block_relations.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2021-11-17_19cdd3ab86f6_fix_parse_websearch.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2022-02-16_bed6bc0b197a_rename_parent_and_child_block_relations.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2023-03-06_e05bb1967eff_add_subscriptions_search_view.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2023-05-25_b1970225392d_add_subscription_metadata_workflow.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2023-06-28_a09ac125ea73_add_throttling_to_refresh_subscriptions.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2023-06-28_a09ac125ea73_add_throttling_to_refresh_subscriptions.sql +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2023-07-17_165303a20fb1_customer_id_to_varchar.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2023-07-17_165303a20fb1_customer_id_to_varchar.sql +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2023-09-25_da5c9f4cce1c_add_subscription_metadata_to_fulltext_.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2023-09-25_da5c9f4cce1c_add_subscription_metadata_to_fulltext_.sql +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2023-12-06_048219045729_add_workflow_id_to_processes_table.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2024-09-27_460ec6748e37_add_uuid_search_workaround.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2024-09-27_460ec6748e37_add_uuid_search_workaround.sql +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2025-01-08_4c5859620539_add_version_column_to_subscription.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2025-01-19_4fjdn13f83ga_add_validate_product_type_task.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2025-02-12_bac6be6f2b4f_added_input_state_table.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2025-02-20_68d14db1b8da_make_workflow_description_mandatory.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2025-03-06_42b3d076a85b_subscription_instance_as_json_function.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2025-03-06_42b3d076a85b_subscription_instance_as_json_function.sql +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2025-04-09_fc5c993a4b4a_add_cascade_constraint_on_processes_.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2025-05-08_161918133bec_add_is_task_to_workflow.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2025-07-01_93fc5834c7e5_changed_timestamping_fields_in_process_steps.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2025-07-04_4b58e336d1bf_deprecating_workflow_target_in_.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/migrations/versions/schema/2025-07-28_850dccac3b02_update_description_of_resume_workflows_.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/py.typed +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/schemas/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/schemas/base.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/schemas/engine_settings.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/schemas/fixed_input.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/schemas/problem_detail.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/schemas/process.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/schemas/product.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/schemas/product_block.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/schemas/resource_type.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/schemas/subscription.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/schemas/subscription_descriptions.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/schemas/workflow.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/security.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/services/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/services/executors/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/services/executors/celery.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/services/executors/threadpool.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/services/fixed_inputs.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/services/input_state.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/services/process_broadcast_thread.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/services/products.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/services/resource_types.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/services/settings.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/services/settings_env_variables.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/services/subscription_relations.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/services/tasks.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/services/translations.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/services/workflows.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/settings.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/types.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/utils/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/utils/auth.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/utils/crypt.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/utils/datetime.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/utils/deprecation_logger.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/utils/docs.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/utils/enrich_process.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/utils/errors.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/utils/expose_settings.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/utils/fixed_inputs.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/utils/functional.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/utils/get_subscription_dict.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/utils/get_updated_properties.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/utils/helpers.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/utils/json.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/utils/redis.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/utils/redis_client.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/utils/search_query.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/utils/state.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/utils/strings.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/utils/validate_data_version.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/version.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/websocket/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/websocket/managers/broadcast_websocket_manager.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/websocket/managers/memory_websocket_manager.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/websocket/websocket_manager.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/workflows/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/workflows/modify_note.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/workflows/removed_workflow.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/workflows/steps.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/workflows/tasks/__init__.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/workflows/tasks/cleanup_tasks_log.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/workflows/tasks/resume_workflows.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/workflows/tasks/validate_product_type.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/workflows/tasks/validate_products.py +0 -0
- {orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/workflows/translations/en-GB.json +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: orchestrator-core
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.4.0
|
|
4
4
|
Summary: This is the orchestrator workflow engine.
|
|
5
5
|
Author-email: SURF <automation-beheer@surf.nl>
|
|
6
6
|
Requires-Python: >=3.11,<3.14
|
|
@@ -32,6 +32,7 @@ Classifier: Typing :: Typed
|
|
|
32
32
|
License-File: LICENSE
|
|
33
33
|
Requires-Dist: alembic==1.16.1
|
|
34
34
|
Requires-Dist: anyio>=3.7.0
|
|
35
|
+
Requires-Dist: apscheduler>=3.11.0
|
|
35
36
|
Requires-Dist: click==8.*
|
|
36
37
|
Requires-Dist: deepmerge==2.0
|
|
37
38
|
Requires-Dist: deprecated>=1.2.18
|
|
@@ -52,7 +53,6 @@ Requires-Dist: python-dateutil==2.8.2
|
|
|
52
53
|
Requires-Dist: python-rapidjson>=1.18,<1.21
|
|
53
54
|
Requires-Dist: pytz==2025.2
|
|
54
55
|
Requires-Dist: redis==5.1.1
|
|
55
|
-
Requires-Dist: schedule==1.1.0
|
|
56
56
|
Requires-Dist: semver==3.0.4
|
|
57
57
|
Requires-Dist: sentry-sdk[fastapi]~=2.29.1
|
|
58
58
|
Requires-Dist: sqlalchemy==2.0.41
|
|
@@ -25,7 +25,7 @@ from fastapi.param_functions import Body, Depends, Header
|
|
|
25
25
|
from fastapi.routing import APIRouter
|
|
26
26
|
from fastapi.websockets import WebSocket
|
|
27
27
|
from fastapi_etag.dependency import CacheHit
|
|
28
|
-
from more_itertools import chunked, last
|
|
28
|
+
from more_itertools import chunked, first, last
|
|
29
29
|
from sentry_sdk.tracing import trace
|
|
30
30
|
from sqlalchemy import CompoundSelect, Select, select
|
|
31
31
|
from sqlalchemy.orm import defer, joinedload
|
|
@@ -88,11 +88,17 @@ def check_global_lock() -> None:
|
|
|
88
88
|
)
|
|
89
89
|
|
|
90
90
|
|
|
91
|
-
def
|
|
92
|
-
"""Extract
|
|
93
|
-
|
|
91
|
+
def get_steps_to_evaluate_for_rbac(pstat: ProcessStat) -> StepList:
|
|
92
|
+
"""Extract all steps from the ProcessStat for a process that should be evaluated for a RBAC callback.
|
|
93
|
+
|
|
94
|
+
For a suspended process this includes all previously completed steps as well as the current step.
|
|
95
|
+
For a completed process this includes all steps.
|
|
96
|
+
"""
|
|
97
|
+
if not (remaining_steps := pstat.log):
|
|
98
|
+
return pstat.workflow.steps
|
|
99
|
+
|
|
94
100
|
past_steps = pstat.workflow.steps[: -len(remaining_steps)]
|
|
95
|
-
return StepList(past_steps
|
|
101
|
+
return StepList(past_steps >> first(remaining_steps))
|
|
96
102
|
|
|
97
103
|
|
|
98
104
|
def get_auth_callbacks(steps: StepList, workflow: Workflow) -> tuple[Authorizer | None, Authorizer | None]:
|
|
@@ -200,7 +206,7 @@ def resume_process_endpoint(
|
|
|
200
206
|
raise_status(HTTPStatus.CONFLICT, f"Resuming a {process.last_status.lower()} workflow is not possible")
|
|
201
207
|
|
|
202
208
|
pstat = load_process(process)
|
|
203
|
-
auth_resume, auth_retry = get_auth_callbacks(
|
|
209
|
+
auth_resume, auth_retry = get_auth_callbacks(get_steps_to_evaluate_for_rbac(pstat), pstat.workflow)
|
|
204
210
|
if process.last_status == ProcessStatus.SUSPENDED:
|
|
205
211
|
if auth_resume is not None and not auth_resume(user_model):
|
|
206
212
|
raise_status(HTTPStatus.FORBIDDEN, "User is not authorized to resume step")
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Copyright 2019-2020 SURF.
|
|
2
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
# you may not use this file except in compliance with the License.
|
|
4
|
+
# You may obtain a copy of the License at
|
|
5
|
+
#
|
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
#
|
|
8
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
# See the License for the specific language governing permissions and
|
|
12
|
+
# limitations under the License.
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
import logging
|
|
16
|
+
import time
|
|
17
|
+
|
|
18
|
+
import typer
|
|
19
|
+
|
|
20
|
+
from orchestrator.schedules.scheduler import (
|
|
21
|
+
get_paused_scheduler,
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
log = logging.getLogger(__name__)
|
|
25
|
+
|
|
26
|
+
app: typer.Typer = typer.Typer()
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@app.command()
|
|
30
|
+
def run() -> None:
|
|
31
|
+
"""Start scheduler and loop eternally to keep thread alive."""
|
|
32
|
+
with get_paused_scheduler() as scheduler:
|
|
33
|
+
scheduler.resume()
|
|
34
|
+
|
|
35
|
+
while True:
|
|
36
|
+
time.sleep(1)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
@app.command()
|
|
40
|
+
def show_schedule() -> None:
|
|
41
|
+
"""Show the currently configured schedule.
|
|
42
|
+
|
|
43
|
+
in cli underscore is replaced by a dash `show-schedule`
|
|
44
|
+
"""
|
|
45
|
+
with get_paused_scheduler() as scheduler:
|
|
46
|
+
jobs = scheduler.get_jobs()
|
|
47
|
+
|
|
48
|
+
for job in jobs:
|
|
49
|
+
typer.echo(f"[{job.id}] Next run: {job.next_run_time} | Trigger: {job.trigger}")
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
@app.command()
|
|
53
|
+
def force(job_id: str) -> None:
|
|
54
|
+
"""Force the execution of (a) scheduler(s) based on a job_id."""
|
|
55
|
+
with get_paused_scheduler() as scheduler:
|
|
56
|
+
job = scheduler.get_job(job_id)
|
|
57
|
+
|
|
58
|
+
if not job:
|
|
59
|
+
typer.echo(f"Job '{job_id}' not found.")
|
|
60
|
+
raise typer.Exit(code=1)
|
|
61
|
+
|
|
62
|
+
typer.echo(f"Running job [{job.id}] now...")
|
|
63
|
+
try:
|
|
64
|
+
job.func(*job.args or (), **job.kwargs or {})
|
|
65
|
+
typer.echo("Job executed successfully.")
|
|
66
|
+
except Exception as e:
|
|
67
|
+
typer.echo(f"Job execution failed: {e}")
|
|
68
|
+
raise typer.Exit(code=1)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import structlog
|
|
2
|
+
|
|
3
|
+
from orchestrator.db.filters import Filter
|
|
4
|
+
from orchestrator.db.sorting import Sort
|
|
5
|
+
from orchestrator.graphql.pagination import Connection
|
|
6
|
+
from orchestrator.graphql.schemas.scheduled_task import ScheduledTaskGraphql
|
|
7
|
+
from orchestrator.graphql.types import GraphqlFilter, GraphqlSort, OrchestratorInfo
|
|
8
|
+
from orchestrator.graphql.utils import create_resolver_error_handler, to_graphql_result_page
|
|
9
|
+
from orchestrator.graphql.utils.is_query_detailed import is_querying_page_data
|
|
10
|
+
from orchestrator.schedules.scheduler import get_scheduler_tasks, scheduled_task_filter_keys, scheduled_task_sort_keys
|
|
11
|
+
|
|
12
|
+
logger = structlog.get_logger(__name__)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
async def resolve_scheduled_tasks(
|
|
16
|
+
info: OrchestratorInfo,
|
|
17
|
+
filter_by: list[GraphqlFilter] | None = None,
|
|
18
|
+
sort_by: list[GraphqlSort] | None = None,
|
|
19
|
+
first: int = 10,
|
|
20
|
+
after: int = 0,
|
|
21
|
+
) -> Connection[ScheduledTaskGraphql]:
|
|
22
|
+
_error_handler = create_resolver_error_handler(info)
|
|
23
|
+
|
|
24
|
+
pydantic_filter_by: list[Filter] = [item.to_pydantic() for item in filter_by] if filter_by else []
|
|
25
|
+
pydantic_sort_by: list[Sort] = [item.to_pydantic() for item in sort_by] if sort_by else []
|
|
26
|
+
scheduled_tasks, total = get_scheduler_tasks(
|
|
27
|
+
first=first, after=after, filter_by=pydantic_filter_by, sort_by=pydantic_sort_by, error_handler=_error_handler
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
graphql_scheduled_tasks = []
|
|
31
|
+
if is_querying_page_data(info):
|
|
32
|
+
graphql_scheduled_tasks = [ScheduledTaskGraphql.from_pydantic(p) for p in scheduled_tasks]
|
|
33
|
+
|
|
34
|
+
return to_graphql_result_page(
|
|
35
|
+
graphql_scheduled_tasks, first, after, total, scheduled_task_filter_keys, scheduled_task_sort_keys
|
|
36
|
+
)
|
|
@@ -51,12 +51,14 @@ from orchestrator.graphql.resolvers import (
|
|
|
51
51
|
resolve_version,
|
|
52
52
|
resolve_workflows,
|
|
53
53
|
)
|
|
54
|
+
from orchestrator.graphql.resolvers.scheduled_tasks import resolve_scheduled_tasks
|
|
54
55
|
from orchestrator.graphql.schemas import DEFAULT_GRAPHQL_MODELS
|
|
55
56
|
from orchestrator.graphql.schemas.customer import CustomerType
|
|
56
57
|
from orchestrator.graphql.schemas.process import ProcessType
|
|
57
58
|
from orchestrator.graphql.schemas.product import ProductType
|
|
58
59
|
from orchestrator.graphql.schemas.product_block import ProductBlock
|
|
59
60
|
from orchestrator.graphql.schemas.resource_type import ResourceType
|
|
61
|
+
from orchestrator.graphql.schemas.scheduled_task import ScheduledTaskGraphql
|
|
60
62
|
from orchestrator.graphql.schemas.settings import StatusType
|
|
61
63
|
from orchestrator.graphql.schemas.subscription import SubscriptionInterface
|
|
62
64
|
from orchestrator.graphql.schemas.version import VersionType
|
|
@@ -99,6 +101,9 @@ class OrchestratorQuery:
|
|
|
99
101
|
description="Returns information about cache, workers, and global engine settings",
|
|
100
102
|
)
|
|
101
103
|
version: VersionType = authenticated_field(resolver=resolve_version, description="Returns version information")
|
|
104
|
+
scheduled_tasks: Connection[ScheduledTaskGraphql] = authenticated_field(
|
|
105
|
+
resolver=resolve_scheduled_tasks, description="Returns scheduled job information"
|
|
106
|
+
)
|
|
102
107
|
|
|
103
108
|
|
|
104
109
|
@strawberry.federation.type(description="Orchestrator customer Query")
|
{orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/schemas/process.py
RENAMED
|
@@ -6,7 +6,7 @@ from strawberry.federation.schema_directives import Key
|
|
|
6
6
|
from strawberry.scalars import JSON
|
|
7
7
|
|
|
8
8
|
from oauth2_lib.strawberry import authenticated_field
|
|
9
|
-
from orchestrator.api.api_v1.endpoints.processes import get_auth_callbacks,
|
|
9
|
+
from orchestrator.api.api_v1.endpoints.processes import get_auth_callbacks, get_steps_to_evaluate_for_rbac
|
|
10
10
|
from orchestrator.db import ProcessTable, ProductTable, db
|
|
11
11
|
from orchestrator.graphql.pagination import EMPTY_PAGE, Connection
|
|
12
12
|
from orchestrator.graphql.schemas.customer import CustomerType
|
|
@@ -82,11 +82,11 @@ 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
|
-
auth_resume, auth_retry = get_auth_callbacks(
|
|
89
|
+
auth_resume, auth_retry = get_auth_callbacks(get_steps_to_evaluate_for_rbac(process), workflow) # type: ignore[arg-type]
|
|
90
90
|
|
|
91
91
|
return FormUserPermissionsType(
|
|
92
92
|
retryAllowed=auth_retry and auth_retry(oidc_user), # type: ignore[arg-type]
|
{orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/graphql/schemas/workflow.py
RENAMED
|
@@ -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
|
|
|
@@ -25,6 +25,6 @@ def _format_context(context: dict) -> str:
|
|
|
25
25
|
|
|
26
26
|
def create_resolver_error_handler(info: OrchestratorInfo) -> CallableErrorHandler:
|
|
27
27
|
def handle_error(message: str, **context) -> None: # type: ignore
|
|
28
|
-
return register_error("
|
|
28
|
+
return register_error(f"{message} {_format_context(context)}", info, error_type=ErrorType.BAD_REQUEST)
|
|
29
29
|
|
|
30
30
|
return handle_error
|
|
@@ -13,12 +13,11 @@
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
from orchestrator.schedules.resume_workflows import run_resume_workflows
|
|
16
|
-
from orchestrator.schedules.scheduling import SchedulingFunction
|
|
17
16
|
from orchestrator.schedules.task_vacuum import vacuum_tasks
|
|
18
17
|
from orchestrator.schedules.validate_products import validate_products
|
|
19
18
|
from orchestrator.schedules.validate_subscriptions import validate_subscriptions
|
|
20
19
|
|
|
21
|
-
ALL_SCHEDULERS: list
|
|
20
|
+
ALL_SCHEDULERS: list = [
|
|
22
21
|
run_resume_workflows,
|
|
23
22
|
vacuum_tasks,
|
|
24
23
|
validate_subscriptions,
|
{orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/schedules/resume_workflows.py
RENAMED
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
# limitations under the License.
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
from orchestrator.schedules.
|
|
15
|
+
from orchestrator.schedules.scheduler import scheduler
|
|
16
16
|
from orchestrator.services.processes import start_process
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
@scheduler(name="Resume workflows",
|
|
19
|
+
@scheduler.scheduled_job(id="resume-workflows", name="Resume workflows", trigger="interval", hours=1) # type: ignore[misc]
|
|
20
20
|
def run_resume_workflows() -> None:
|
|
21
21
|
start_process("task_resume_workflows")
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# Copyright 2019-2020 SURF.
|
|
2
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
# you may not use this file except in compliance with the License.
|
|
4
|
+
# You may obtain a copy of the License at
|
|
5
|
+
#
|
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
#
|
|
8
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
# See the License for the specific language governing permissions and
|
|
12
|
+
# limitations under the License.
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from contextlib import contextmanager
|
|
16
|
+
from datetime import datetime
|
|
17
|
+
from typing import Any, Generator
|
|
18
|
+
|
|
19
|
+
from apscheduler.executors.pool import ThreadPoolExecutor
|
|
20
|
+
from apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore
|
|
21
|
+
from apscheduler.schedulers.background import BackgroundScheduler
|
|
22
|
+
from more_itertools import partition
|
|
23
|
+
from pydantic import BaseModel
|
|
24
|
+
|
|
25
|
+
from orchestrator.db.filters import Filter
|
|
26
|
+
from orchestrator.db.filters.filters import CallableErrorHandler
|
|
27
|
+
from orchestrator.db.sorting import Sort
|
|
28
|
+
from orchestrator.db.sorting.sorting import SortOrder
|
|
29
|
+
from orchestrator.settings import app_settings
|
|
30
|
+
from orchestrator.utils.helpers import camel_to_snake, to_camel
|
|
31
|
+
|
|
32
|
+
jobstores = {"default": SQLAlchemyJobStore(url=str(app_settings.DATABASE_URI))}
|
|
33
|
+
executors = {
|
|
34
|
+
"default": ThreadPoolExecutor(1),
|
|
35
|
+
}
|
|
36
|
+
job_defaults = {
|
|
37
|
+
"coalesce": True,
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
scheduler = BackgroundScheduler(jobstores=jobstores, executors=executors, job_defaults=job_defaults)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def scheduler_dispose_db_connections() -> None:
|
|
44
|
+
jobstores["default"].engine.dispose()
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@contextmanager
|
|
48
|
+
def get_paused_scheduler() -> Generator[BackgroundScheduler, Any, None]:
|
|
49
|
+
scheduler.start(paused=True)
|
|
50
|
+
|
|
51
|
+
try:
|
|
52
|
+
yield scheduler
|
|
53
|
+
finally:
|
|
54
|
+
scheduler.shutdown()
|
|
55
|
+
scheduler_dispose_db_connections()
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class ScheduledTask(BaseModel):
|
|
59
|
+
id: str
|
|
60
|
+
name: str | None = None
|
|
61
|
+
next_run_time: datetime | None = None
|
|
62
|
+
trigger: str
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
scheduled_task_keys = set(ScheduledTask.model_fields.keys())
|
|
66
|
+
scheduled_task_filter_keys = sorted(scheduled_task_keys | {to_camel(key) for key in scheduled_task_keys})
|
|
67
|
+
scheduled_task_sort_keys = scheduled_task_filter_keys
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def scheduled_task_in_filter(job: ScheduledTask, filter_by: list[Filter]) -> bool:
|
|
71
|
+
return any(f.value.lower() in getattr(job, camel_to_snake(f.field), "").lower() for f in filter_by)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def filter_scheduled_tasks(
|
|
75
|
+
scheduled_tasks: list[ScheduledTask],
|
|
76
|
+
handle_filter_error: CallableErrorHandler,
|
|
77
|
+
filter_by: list[Filter] | None = None,
|
|
78
|
+
) -> list[ScheduledTask]:
|
|
79
|
+
if not filter_by:
|
|
80
|
+
return scheduled_tasks
|
|
81
|
+
|
|
82
|
+
try:
|
|
83
|
+
invalid_filters, valid_filters = partition(lambda x: x.field in scheduled_task_filter_keys, filter_by)
|
|
84
|
+
|
|
85
|
+
if invalid_list := [item.field for item in invalid_filters]:
|
|
86
|
+
handle_filter_error(
|
|
87
|
+
"Invalid filter arguments", invalid_filters=invalid_list, valid_filter_keys=scheduled_task_filter_keys
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
valid_filter_list = list(valid_filters)
|
|
91
|
+
return [task for task in scheduled_tasks if scheduled_task_in_filter(task, valid_filter_list)]
|
|
92
|
+
except Exception as e:
|
|
93
|
+
handle_filter_error(str(e))
|
|
94
|
+
return []
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def _invert(value: Any) -> Any:
|
|
98
|
+
"""Invert value for descending order."""
|
|
99
|
+
if isinstance(value, (int, float)):
|
|
100
|
+
return -value
|
|
101
|
+
if isinstance(value, str):
|
|
102
|
+
return tuple(-ord(c) for c in value)
|
|
103
|
+
if isinstance(value, datetime):
|
|
104
|
+
return -value.timestamp()
|
|
105
|
+
return value
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def sort_key(sort_field: str, sort_order: SortOrder) -> Any:
|
|
109
|
+
def _sort_key(task: Any) -> Any:
|
|
110
|
+
value = getattr(task, camel_to_snake(sort_field), None)
|
|
111
|
+
if sort_field == "next_run_time" and value is None:
|
|
112
|
+
return float("inf") if sort_order == SortOrder.ASC else float("-inf")
|
|
113
|
+
return value if sort_order == SortOrder.ASC else _invert(value)
|
|
114
|
+
|
|
115
|
+
return _sort_key
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
def sort_scheduled_tasks(
|
|
119
|
+
scheduled_tasks: list[ScheduledTask], handle_sort_error: CallableErrorHandler, sort_by: list[Sort] | None = None
|
|
120
|
+
) -> list[ScheduledTask]:
|
|
121
|
+
if not sort_by:
|
|
122
|
+
return scheduled_tasks
|
|
123
|
+
|
|
124
|
+
try:
|
|
125
|
+
invalid_sorting, valid_sorting = partition(lambda x: x.field in scheduled_task_sort_keys, sort_by)
|
|
126
|
+
if invalid_list := [item.field for item in invalid_sorting]:
|
|
127
|
+
handle_sort_error(
|
|
128
|
+
"Invalid sort arguments", invalid_sorting=invalid_list, valid_sort_keys=scheduled_task_sort_keys
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
valid_sort_list = list(valid_sorting)
|
|
132
|
+
return sorted(
|
|
133
|
+
scheduled_tasks, key=lambda task: tuple(sort_key(sort.field, sort.order)(task) for sort in valid_sort_list)
|
|
134
|
+
)
|
|
135
|
+
except Exception as e:
|
|
136
|
+
handle_sort_error(str(e))
|
|
137
|
+
return []
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def default_error_handler(message: str, **context) -> None: # type: ignore
|
|
141
|
+
from orchestrator.graphql.utils.create_resolver_error_handler import _format_context
|
|
142
|
+
|
|
143
|
+
raise ValueError(f"{message} {_format_context(context)}")
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
def get_scheduler_tasks(
|
|
147
|
+
first: int = 10,
|
|
148
|
+
after: int = 0,
|
|
149
|
+
filter_by: list[Filter] | None = None,
|
|
150
|
+
sort_by: list[Sort] | None = None,
|
|
151
|
+
error_handler: CallableErrorHandler = default_error_handler,
|
|
152
|
+
) -> tuple[list[ScheduledTask], int]:
|
|
153
|
+
with get_paused_scheduler() as pauzed_scheduler:
|
|
154
|
+
scheduled_tasks = pauzed_scheduler.get_jobs()
|
|
155
|
+
|
|
156
|
+
scheduled_tasks = filter_scheduled_tasks(scheduled_tasks, error_handler, filter_by)
|
|
157
|
+
scheduled_tasks = sort_scheduled_tasks(scheduled_tasks, error_handler, sort_by)
|
|
158
|
+
|
|
159
|
+
total = len(scheduled_tasks)
|
|
160
|
+
paginated_tasks = scheduled_tasks[after : after + first + 1]
|
|
161
|
+
|
|
162
|
+
return [
|
|
163
|
+
ScheduledTask(
|
|
164
|
+
id=task.id,
|
|
165
|
+
name=task.name,
|
|
166
|
+
next_run_time=task.next_run_time,
|
|
167
|
+
trigger=str(task.trigger),
|
|
168
|
+
)
|
|
169
|
+
for task in paginated_tasks
|
|
170
|
+
], total
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Copyright 2019-2020 SURF.
|
|
2
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
# you may not use this file except in compliance with the License.
|
|
4
|
+
# You may obtain a copy of the License at
|
|
5
|
+
#
|
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
#
|
|
8
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
# See the License for the specific language governing permissions and
|
|
12
|
+
# limitations under the License.
|
|
13
|
+
|
|
14
|
+
from collections.abc import Callable
|
|
15
|
+
from typing import TypeVar
|
|
16
|
+
|
|
17
|
+
from apscheduler.schedulers.base import BaseScheduler
|
|
18
|
+
from deprecated import deprecated
|
|
19
|
+
|
|
20
|
+
from orchestrator.schedules.scheduler import scheduler as default_scheduler # your global scheduler instance
|
|
21
|
+
|
|
22
|
+
F = TypeVar("F", bound=Callable[..., object])
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@deprecated(
|
|
26
|
+
reason="We changed from scheduler to apscheduler which has its own decoractor, use `@scheduler.scheduled_job()` from `from orchestrator.scheduling.scheduler import scheduler`"
|
|
27
|
+
)
|
|
28
|
+
def scheduler(
|
|
29
|
+
name: str,
|
|
30
|
+
time_unit: str,
|
|
31
|
+
period: int = 1,
|
|
32
|
+
at: str | None = None,
|
|
33
|
+
*,
|
|
34
|
+
id: str | None = None,
|
|
35
|
+
scheduler: BaseScheduler = default_scheduler,
|
|
36
|
+
) -> Callable[[F], F]:
|
|
37
|
+
"""APScheduler-compatible decorator to schedule a function.
|
|
38
|
+
|
|
39
|
+
id is necessary with apscheduler, if left empty it takes the function name.
|
|
40
|
+
|
|
41
|
+
- `time_unit = "hours", period = 12` → every 12 hours
|
|
42
|
+
- `time_unit = "day", at = "01:00"` → every day at 1 AM
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
def decorator(func: F) -> F:
|
|
46
|
+
job_id = id or func.__name__
|
|
47
|
+
|
|
48
|
+
trigger = "interval"
|
|
49
|
+
kwargs: dict[str, int] = {}
|
|
50
|
+
if time_unit == "day" and at:
|
|
51
|
+
trigger = "cron"
|
|
52
|
+
try:
|
|
53
|
+
hour, minute = map(int, at.split(":"))
|
|
54
|
+
except ValueError:
|
|
55
|
+
raise ValueError(f"Invalid time format for 'at': {at}, expected 'HH:MM'")
|
|
56
|
+
|
|
57
|
+
kwargs = {
|
|
58
|
+
"hour": hour,
|
|
59
|
+
"minute": minute,
|
|
60
|
+
}
|
|
61
|
+
else:
|
|
62
|
+
# Map string units to timedelta kwargs for IntervalTrigger
|
|
63
|
+
unit_map = {
|
|
64
|
+
"seconds": "seconds",
|
|
65
|
+
"second": "seconds",
|
|
66
|
+
"minutes": "minutes",
|
|
67
|
+
"minute": "minutes",
|
|
68
|
+
"hours": "hours",
|
|
69
|
+
"hour": "hours",
|
|
70
|
+
"days": "days",
|
|
71
|
+
"day": "days",
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
interval_arg = unit_map.get(time_unit.lower(), time_unit.lower())
|
|
75
|
+
kwargs = {interval_arg: period}
|
|
76
|
+
|
|
77
|
+
scheduler.add_job(
|
|
78
|
+
func,
|
|
79
|
+
trigger=trigger,
|
|
80
|
+
id=job_id,
|
|
81
|
+
name=name,
|
|
82
|
+
replace_existing=True,
|
|
83
|
+
**kwargs,
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
return func
|
|
87
|
+
|
|
88
|
+
return decorator
|
{orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/schedules/task_vacuum.py
RENAMED
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
# limitations under the License.
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
from orchestrator.schedules.
|
|
15
|
+
from orchestrator.schedules.scheduler import scheduler
|
|
16
16
|
from orchestrator.services.processes import start_process
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
@scheduler(name="Clean up tasks",
|
|
19
|
+
@scheduler.scheduled_job(id="clean-tasks", name="Clean up tasks", trigger="interval", hours=6) # type: ignore[misc]
|
|
20
20
|
def vacuum_tasks() -> None:
|
|
21
21
|
start_process("task_clean_up_tasks")
|
{orchestrator_core-4.3.0rc3 → orchestrator_core-4.4.0}/orchestrator/schedules/validate_products.py
RENAMED
|
@@ -14,11 +14,17 @@ from sqlalchemy import func, select
|
|
|
14
14
|
|
|
15
15
|
from orchestrator.db import db
|
|
16
16
|
from orchestrator.db.models import ProcessTable
|
|
17
|
-
from orchestrator.schedules.
|
|
17
|
+
from orchestrator.schedules.scheduler import scheduler
|
|
18
18
|
from orchestrator.services.processes import start_process
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
@scheduler(
|
|
21
|
+
@scheduler.scheduled_job( # type: ignore[misc]
|
|
22
|
+
id="validate-products",
|
|
23
|
+
name="Validate Products and inactive subscriptions",
|
|
24
|
+
trigger="cron",
|
|
25
|
+
hour=2,
|
|
26
|
+
minute=30,
|
|
27
|
+
)
|
|
22
28
|
def validate_products() -> None:
|
|
23
29
|
uncompleted_products = db.session.scalar(
|
|
24
30
|
select(func.count())
|
|
@@ -16,7 +16,7 @@ from threading import BoundedSemaphore
|
|
|
16
16
|
|
|
17
17
|
import structlog
|
|
18
18
|
|
|
19
|
-
from orchestrator.schedules.
|
|
19
|
+
from orchestrator.schedules.scheduler import scheduler
|
|
20
20
|
from orchestrator.services.subscriptions import (
|
|
21
21
|
get_subscriptions_on_product_table,
|
|
22
22
|
get_subscriptions_on_product_table_in_sync,
|
|
@@ -33,7 +33,7 @@ logger = structlog.get_logger(__name__)
|
|
|
33
33
|
task_semaphore = BoundedSemaphore(value=2)
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
@scheduler(name="Subscriptions Validator",
|
|
36
|
+
@scheduler.scheduled_job(id="subscriptions-validator", name="Subscriptions Validator", trigger="cron", hour=0, minute=10) # type: ignore[misc]
|
|
37
37
|
def validate_subscriptions() -> None:
|
|
38
38
|
if app_settings.VALIDATE_OUT_OF_SYNC_SUBSCRIPTIONS:
|
|
39
39
|
# Automatically re-validate out-of-sync subscriptions. This is not recommended for production.
|
|
@@ -733,11 +733,17 @@ def abort_process(process: ProcessTable, user: str, broadcast_func: Callable | N
|
|
|
733
733
|
|
|
734
734
|
|
|
735
735
|
def _recoverwf(wf: Workflow, log: list[WFProcess]) -> tuple[WFProcess, StepList]:
|
|
736
|
-
|
|
736
|
+
"""Recover workflow state and remaining steps from the given 'Process step' objects.
|
|
737
737
|
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
738
|
+
Returns:
|
|
739
|
+
- The state accumulated up until the last cleared (completed) step\
|
|
740
|
+
- The remaining steps to execute (including Failed, Suspended and (A)waiting steps)
|
|
741
|
+
"""
|
|
742
|
+
|
|
743
|
+
def is_cleared(p: WFProcess) -> bool:
|
|
744
|
+
return not (p.isfailed() or p.issuspend() or p.iswaiting() or p.isawaitingcallback())
|
|
745
|
+
|
|
746
|
+
persistent = [p for p in log if is_cleared(p)]
|
|
741
747
|
stepcount = len(persistent)
|
|
742
748
|
|
|
743
749
|
if log and (log[-1].issuspend() or log[-1].isawaitingcallback()):
|
|
@@ -760,15 +766,14 @@ def _recoverwf(wf: Workflow, log: list[WFProcess]) -> tuple[WFProcess, StepList]
|
|
|
760
766
|
|
|
761
767
|
|
|
762
768
|
def _restore_log(steps: list[ProcessStepTable]) -> list[WFProcess]:
|
|
763
|
-
|
|
764
|
-
for step in steps:
|
|
765
|
-
process = WFProcess.from_status(step.status, step.state)
|
|
769
|
+
"""Deserialize ProcessStepTable objects into foldable 'Process step' objects."""
|
|
766
770
|
|
|
767
|
-
|
|
768
|
-
|
|
771
|
+
def deserialize(step: ProcessStepTable) -> WFProcess:
|
|
772
|
+
if not (wf_process := WFProcess.from_status(step.status, step.state)):
|
|
773
|
+
raise ValueError(f"Unable to deserialize step from it's status {step.status}")
|
|
774
|
+
return wf_process
|
|
769
775
|
|
|
770
|
-
|
|
771
|
-
return result
|
|
776
|
+
return [deserialize(step) for step in steps]
|
|
772
777
|
|
|
773
778
|
|
|
774
779
|
def load_process(process: ProcessTable) -> ProcessStat:
|