stabilize 0.34.2__tar.gz → 0.34.3__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.
- {stabilize-0.34.2 → stabilize-0.34.3}/PKG-INFO +1 -1
- {stabilize-0.34.2 → stabilize-0.34.3}/pyproject.toml +1 -1
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/__init__.py +1 -1
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/run_task/result.py +1 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/signal_stage.py +33 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/postgres/transaction.py +2 -90
- stabilize-0.34.3/src/stabilize/persistence/postgres/transaction_signals.py +117 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/sqlite/transaction_ops.py +6 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/store/transaction.py +4 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/.gitignore +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/LICENSE +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/README.md +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/agent_team/README.md +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/agent_team/main.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/agent_team/team_tasks.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/benchmark-overhead.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/docker-example.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/dynamic-routing-example.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/event-sourcing-example.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/golden-standard-expected-result.txt +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/golden-standard.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/highway-integration-example.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/http-example.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/incident_commander/README.md +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/incident_commander/incident_tasks.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/incident_commander/main.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/incident_commander/tools.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/lats-coding-agent.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/llama-example.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/llama_example_pipelines.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/llama_example_support.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/python-example.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/python_example_pipelines.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/python_servers.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/research_analyst/README.md +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/research_analyst/analyst_tasks.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/research_analyst/main.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/research_analyst/tools.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/shell-example.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/examples/ssh-example.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/migrations/01KDQ4N9QPJ6Q4MCV3V9GHWPV4_initial_schema.sql +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/migrations/01KE39HEAN221S7AWNS4A0H750_add_performance_indexes.sql +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/migrations/01KE4YJT2W8A6NBX5R7CQMJK84_add_dlq_table.sql +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/migrations/01KE5ZQT3X9B7PCS8R8DRMLN85_add_processed_messages.sql +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/migrations/01KE60R04X0C8QDTS9SEESMN96_add_task_version.sql +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/migrations/01KFA6JDAS811CB5RKPD1FBAST_add_stage_version.sql +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/migrations/01KGFG6RM7NRCJ2PPJ7FZAM0Y9_widen_message_id_column.sql +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/migrations/01KGHWCP1M2QSDE3TN4GUBLV8A_add_workflow_control_flow_patterns.sql +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/migrations/01KWHFBW2B5VZJENEA3D8Z2YPW_add_stage_claims.sql +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/migrations/01KYTB6S57X765P3BJYY58H79Z_add_queue_task_id_index.sql +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/migrations/01M483DVR3DS980FHS8N754CWH_queue_bigint_ids_and_timestamptz.sql +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/migrations/01M4PAJCF82KCKYT5X4GMZH2XG_workflow_queue_table_and_stage_index.sql +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/migrations/01M4Q8VTM40WEC4HR2X31Q07A5_workflow_config_version.sql +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/migrations/01M4SVVY5XE3S18Y0CPQ8TATDP_purge_and_lookup_indexes.sql +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/migrations/01M64SFQG36NHV5KQ3SHH5Z832_event_store_tables.sql +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/migrations/01M64SFQGDVM97KQS2FFAJ72R5_task_leases.sql +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/migrations/01M67VCHWECA748FVXG88MF3YF_tenant_key.sql +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/migrations/01M684KJKQKEY9RG0RPEZ43GW1_tenant_indexes.sql +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/migrations/01M68BCSDHR6ECPVVESPS8WJC4_task_generation.sql +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/migrations/01M68FGEZVQR6KPAMW6P5N8B0E_recovery_activity.sql +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/migrations/01M68J0WB7ASSYV0JQYBA2KAQM_signal_delivery.sql +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/migrations/01M68P99JK1H6MC1W6RZ0SNHH0_definition_version.sql +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/migrations/01M68PK3W1DW3T8GZ3YKE3SVSJ_redelivery_budget.sql +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/migrations/01M68QC4M0YQASJV3NP98564RB_processed_at_timestamptz.sql +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/migrations/01M68V88TB2FZ4AG6AH1QW3YY4_subscription_cursor.sql +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/assertions.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/audit.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/cli/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/cli/adoption.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/cli/commands.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/cli/config.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/cli/driver.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/cli/grants.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/cli/history_location.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/cli/legacy_history.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/cli/main.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/cli/maintenance_commands.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/cli/migrate.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/cli/migrate_zone.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/cli/migrations.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/cli/migretti_runner.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/cli/prompt_text.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/cli/prompt_text.txt +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/cli/queue_table_cli.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/cli/schema_model.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/cli/tenancy_cli.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/conditions.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/context/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/context/stage_context.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/dag/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/dag/deferred_choice.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/dag/graph.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/dag/merge.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/dag/readiness.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/dag/readiness_types.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/dag/topological.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/definition_hash.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/error_codes.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/errors/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/errors/base.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/errors/chain.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/errors/delivery.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/errors/permanent.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/errors/sqlstates.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/errors/store_errors.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/errors/task.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/errors/transient.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/errors/utils.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/errors/verification.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/errors/workflow.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/base.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/bus.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/projections/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/projections/base.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/projections/metrics.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/projections/timeline.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/recorder/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/recorder/base.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/recorder/composed.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/recorder/context.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/recorder/digests.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/recorder/generic_events.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/recorder/instance.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/recorder/stage_events.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/recorder/task_events.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/recorder/workflow_events.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/replay.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/snapshots.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/store/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/store/interface.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/store/postgres/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/store/postgres/events.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/store/postgres/retention.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/store/postgres/schema.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/store/postgres/snapshots.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/store/postgres/store.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/store/postgres/subscriptions.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/store/retention.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/store/sqlite/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/store/sqlite/events.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/store/sqlite/retention.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/store/sqlite/schema.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/store/sqlite/snapshots.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/store/sqlite/store.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/store/sqlite/subscriptions.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/store/subscription_names.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/subscriptions.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/events/txn_scope.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/exceptions.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/expressions.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/finalizers.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/add_multi_instance.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/admission.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/base.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/cancel_hooks.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/cancel_region.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/cancel_stage.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/complete_stage/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/complete_stage/deferred.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/complete_stage/fan_out.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/complete_stage/handler.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/complete_stage/planner.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/complete_stage/split_logic.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/complete_stage/support.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/complete_task.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/complete_workflow.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/continue_parent_stage.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/defaults.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/deferred_choice.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/event_recording.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/jump_to_stage/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/jump_to_stage/handler.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/jump_to_stage/reset.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/jump_to_stage/target.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/jump_to_stage/traversal.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/run_task/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/run_task/error.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/run_task/execution.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/run_task/generation.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/run_task/guards.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/run_task/handler.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/run_task/held_results.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/run_task/lease.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/run_task/saving.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/run_task/verification.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/signal_cleanup.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/signal_refusal.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/skip_stage.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/start_stage/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/start_stage/conditions.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/start_stage/handler.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/start_stage/orchestration.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/start_stage/planner.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/start_stage/starting.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/start_task.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/start_waiting_workflows.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/start_workflow.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/handlers/workflow_control.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/hitl.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/launcher.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/lifecycle.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/llm/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/llm/client.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/llm/tasks.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/llm/tools.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/logging.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/maintenance.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/metrics.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/migrations/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/models/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/models/multi_instance.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/models/snapshot.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/models/stage/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/models/stage/completion_records.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/models/stage/definition.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/models/stage/engine_keys.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/models/stage/enums.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/models/stage/navigation.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/models/stage/stage.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/models/status.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/models/task.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/models/workflow.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/monitor/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/monitor/data.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/monitor/display/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/monitor/display/constants.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/monitor/display/fetcher.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/monitor/display/interaction.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/monitor/display/monitor.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/monitor/display/rendering.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/monitor/models.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/orchestrator.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/borrow.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/borrow_hook.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/columns.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/committed_marks.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/connection.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/control_states.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/factory.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/floors.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/function_sources.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/pool_options.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/postgres/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/postgres/converters.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/postgres/helpers.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/postgres/maintenance.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/postgres/operations.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/postgres/queries.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/postgres/signals.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/postgres/stage_query.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/postgres/store.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/postgres/workflow_ops.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/schema_check.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/signal_scope.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/sqlite/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/sqlite/converters.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/sqlite/helpers.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/sqlite/migrations.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/sqlite/operations.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/sqlite/queries.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/sqlite/schema.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/sqlite/signals.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/sqlite/store/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/sqlite/store/queries.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/sqlite/store/stage_ops.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/sqlite/store/stage_query.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/sqlite/store/store.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/sqlite/store/workflow_crud.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/sqlite/tenant_schema.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/sqlite/transaction.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/sqlite_config.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/store/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/store/criteria.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/store/ids.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/store/interface.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/store/maintenance_defaults.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/store/noop_transaction.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/store/owned_rows.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/store/query_defaults.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/store/signal_defaults.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/store/stage_criteria.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/task_lease.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/task_state.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/tenancy.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/persistence/transaction.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/py.typed +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/decode.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/dedup.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/dlq.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/interface.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/message_base.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/message_contract.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/message_ids.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/messages.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/ownership.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/postgres.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/postgres_lookups.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/processor/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/processor/config.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/processor/drain.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/processor/handler_base.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/processor/lease_guard.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/processor/mixins.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/processor/processor.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/processor/redelivery.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/processor/retention.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/processor/submission.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/processor/synchronous.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/sqlite/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/sqlite/dlq.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/sqlite/lookups.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/sqlite/queue.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/sqlite/schema.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/queue/sqlite/serialization.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/recovery.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/recovery_age.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/recovery_plan.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/recovery_rules.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/redaction.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/reducers.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/resilience/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/resilience/bulkheads.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/resilience/cancellation.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/resilience/circuits.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/resilience/config.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/resilience/executor.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/resilience/process_executor.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/resilience/timeouts.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/stages/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/stages/builder.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/stages/loop_builder.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/stages/multi_instance_builder.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/streaming.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/tasks/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/tasks/builtins.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/tasks/docker.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/tasks/docker_commands.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/tasks/handles.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/tasks/highway/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/tasks/highway/config.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/tasks/highway/task.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/tasks/http/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/tasks/http/constants.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/tasks/http/guarded_opener.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/tasks/http/request.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/tasks/http/response.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/tasks/http/ssl_context.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/tasks/http/task.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/tasks/http/utils.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/tasks/interface.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/tasks/loop.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/tasks/python.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/tasks/registry.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/tasks/result.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/tasks/shell.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/tasks/ssh.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/tasks/sub_workflow.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/threads.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/tracing.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/validation/__init__.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/validation/errors.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/validation/helpers.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/validation/schemas.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/validation/validator.py +0 -0
- {stabilize-0.34.2 → stabilize-0.34.3}/src/stabilize/verification.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: stabilize
|
|
3
|
-
Version: 0.34.
|
|
3
|
+
Version: 0.34.3
|
|
4
4
|
Summary: Stabilize Workflow Orchestration - Agentic Parallel Workflows
|
|
5
5
|
Project-URL: Homepage, https://github.com/rodmena-limited/stabilize
|
|
6
6
|
Project-URL: Repository, https://github.com/rodmena-limited/stabilize
|
|
@@ -213,6 +213,7 @@ def _handle_suspended(
|
|
|
213
213
|
|
|
214
214
|
def resume_or_wait(txn: StoreTransaction) -> list[tuple[Message, float | None]]:
|
|
215
215
|
nonlocal resumed
|
|
216
|
+
txn.lock_stage(stage.id)
|
|
216
217
|
for key in signal_keys:
|
|
217
218
|
stage.context.pop(key, None)
|
|
218
219
|
stage.context.update(before)
|
|
@@ -161,6 +161,39 @@ class SignalStageHandler(StabilizeHandler[SignalStage]):
|
|
|
161
161
|
)
|
|
162
162
|
|
|
163
163
|
with self.repository.transaction(self.queue) as txn:
|
|
164
|
+
if txn.lock_stage(stage.id) == WorkflowStatus.SUSPENDED.name:
|
|
165
|
+
logger.info(
|
|
166
|
+
"Stage %s suspended while signal '%s' was being buffered; delivering it",
|
|
167
|
+
stage.name,
|
|
168
|
+
message.signal_name,
|
|
169
|
+
)
|
|
170
|
+
row_id = message.signal_row_id
|
|
171
|
+
if row_id is None and store_backed:
|
|
172
|
+
row_id = (
|
|
173
|
+
txn.buffer_signal(
|
|
174
|
+
stage.execution.id,
|
|
175
|
+
stage.ref_id,
|
|
176
|
+
message.signal_name,
|
|
177
|
+
message.signal_data,
|
|
178
|
+
user=message.user,
|
|
179
|
+
persistent=True,
|
|
180
|
+
)
|
|
181
|
+
or None
|
|
182
|
+
)
|
|
183
|
+
txn.push_message(
|
|
184
|
+
SignalStage(
|
|
185
|
+
execution_type=message.execution_type,
|
|
186
|
+
execution_id=message.execution_id,
|
|
187
|
+
stage_id=message.stage_id,
|
|
188
|
+
signal_name=message.signal_name,
|
|
189
|
+
signal_data=message.signal_data,
|
|
190
|
+
persistent=True,
|
|
191
|
+
user=message.user,
|
|
192
|
+
signal_row_id=row_id,
|
|
193
|
+
)
|
|
194
|
+
)
|
|
195
|
+
self.mark_in(txn, message, "SignalStage")
|
|
196
|
+
return
|
|
164
197
|
if message.signal_row_id is None:
|
|
165
198
|
stored = 0
|
|
166
199
|
if store_backed:
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
import json
|
|
6
5
|
import logging
|
|
7
6
|
from typing import TYPE_CHECKING, Any
|
|
8
7
|
|
|
9
8
|
from stabilize.errors.delivery import DuplicateDeliveryError
|
|
9
|
+
from stabilize.persistence.postgres.transaction_signals import PostgresSignalTransactionMixin
|
|
10
10
|
from stabilize.persistence.store import StoreTransaction
|
|
11
11
|
from stabilize.persistence.task_state import Captured, capture, commit_captured, versions
|
|
12
12
|
from stabilize.persistence.tenancy import refuse_foreign_row
|
|
@@ -24,7 +24,7 @@ logger = logging.getLogger(__name__)
|
|
|
24
24
|
ADMISSION_LOCK_CLASS = 0x5354424C
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
class PostgresTransaction(StoreTransaction):
|
|
27
|
+
class PostgresTransaction(PostgresSignalTransactionMixin, StoreTransaction):
|
|
28
28
|
"""Atomic transaction spanning store and queue operations for PostgreSQL.
|
|
29
29
|
|
|
30
30
|
This transaction ensures true database-level atomicity for all operations.
|
|
@@ -318,94 +318,6 @@ class PostgresTransaction(StoreTransaction):
|
|
|
318
318
|
"DELETE FROM stage_executions WHERE id = %(stage_id)s AND stabilize_tenant = %(tenant)s", params
|
|
319
319
|
)
|
|
320
320
|
|
|
321
|
-
def _discard_if_complete(self, stage: StageExecution) -> None:
|
|
322
|
-
if not stage.status.is_complete or not self._store.supports_signal_storage():
|
|
323
|
-
return
|
|
324
|
-
with self._conn.cursor() as cur:
|
|
325
|
-
cur.execute(
|
|
326
|
-
"DELETE FROM workflow_signals WHERE consumed = FALSE AND stabilize_tenant = %(tenant)s "
|
|
327
|
-
"AND stage_ref_id = %(ref)s AND execution_id = (SELECT execution_id FROM stage_executions "
|
|
328
|
-
"WHERE id = %(stage_id)s AND stabilize_tenant = %(tenant)s)",
|
|
329
|
-
{"tenant": self._tenant, "ref": stage.ref_id, "stage_id": stage.id},
|
|
330
|
-
)
|
|
331
|
-
dropped = int(cur.rowcount or 0)
|
|
332
|
-
if dropped:
|
|
333
|
-
logger.warning(
|
|
334
|
-
"Discarded %d pending signal(s) on stage %s entering %s", dropped, stage.id, stage.status.name
|
|
335
|
-
)
|
|
336
|
-
|
|
337
|
-
def consume_signal(
|
|
338
|
-
self,
|
|
339
|
-
execution_id: str,
|
|
340
|
-
stage_ref_id: str,
|
|
341
|
-
signal_name: str | None = None,
|
|
342
|
-
*,
|
|
343
|
-
row_id: int | None = None,
|
|
344
|
-
) -> dict[str, Any] | None:
|
|
345
|
-
clauses = ""
|
|
346
|
-
params: dict[str, Any] = {"e": execution_id, "s": stage_ref_id, "tenant": self._tenant}
|
|
347
|
-
if signal_name:
|
|
348
|
-
clauses += " AND signal_name = %(name)s"
|
|
349
|
-
params["name"] = signal_name
|
|
350
|
-
if row_id is not None:
|
|
351
|
-
clauses += " AND id = %(row_id)s"
|
|
352
|
-
params["row_id"] = row_id
|
|
353
|
-
with self._conn.cursor() as cur:
|
|
354
|
-
cur.execute(
|
|
355
|
-
"UPDATE workflow_signals SET consumed = TRUE, consumed_at = NOW() WHERE id = ("
|
|
356
|
-
"SELECT id FROM workflow_signals WHERE execution_id = %(e)s AND stage_ref_id = %(s)s "
|
|
357
|
-
f"AND stabilize_tenant = %(tenant)s AND consumed = FALSE{clauses} "
|
|
358
|
-
"ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1) RETURNING signal_name, signal_data",
|
|
359
|
-
params,
|
|
360
|
-
)
|
|
361
|
-
row = cur.fetchone()
|
|
362
|
-
if not row:
|
|
363
|
-
return None
|
|
364
|
-
if isinstance(row, dict):
|
|
365
|
-
return {"signal_name": row["signal_name"], "signal_data": row["signal_data"] or {}}
|
|
366
|
-
return {"signal_name": row[0], "signal_data": row[1] or {}}
|
|
367
|
-
|
|
368
|
-
def buffer_signal(
|
|
369
|
-
self,
|
|
370
|
-
execution_id: str,
|
|
371
|
-
stage_ref_id: str,
|
|
372
|
-
signal_name: str,
|
|
373
|
-
signal_data: dict[str, Any] | None = None,
|
|
374
|
-
*,
|
|
375
|
-
consumed: bool = False,
|
|
376
|
-
user: str = "",
|
|
377
|
-
persistent: bool = True,
|
|
378
|
-
) -> int:
|
|
379
|
-
with self._conn.cursor() as cur:
|
|
380
|
-
cur.execute(
|
|
381
|
-
"INSERT INTO workflow_signals (execution_id, stage_ref_id, signal_name, signal_data, consumed, "
|
|
382
|
-
"consumed_at, signal_user, persistent, stabilize_tenant) VALUES (%(e)s, %(s)s, %(n)s, %(d)s, %(c)s, "
|
|
383
|
-
"CASE WHEN %(c)s THEN NOW() ELSE NULL END, %(u)s, %(p)s, %(tenant)s) RETURNING id",
|
|
384
|
-
{
|
|
385
|
-
"e": execution_id,
|
|
386
|
-
"s": stage_ref_id,
|
|
387
|
-
"n": signal_name,
|
|
388
|
-
"d": json.dumps(signal_data or {}, default=str),
|
|
389
|
-
"c": consumed,
|
|
390
|
-
"u": user,
|
|
391
|
-
"p": persistent,
|
|
392
|
-
"tenant": self._tenant,
|
|
393
|
-
},
|
|
394
|
-
)
|
|
395
|
-
row = cur.fetchone()
|
|
396
|
-
if not row:
|
|
397
|
-
return 0
|
|
398
|
-
return int(row["id"] if isinstance(row, dict) else row[0])
|
|
399
|
-
|
|
400
|
-
def discard_signals(self, execution_id: str, stage_ref_id: str) -> int:
|
|
401
|
-
with self._conn.cursor() as cur:
|
|
402
|
-
cur.execute(
|
|
403
|
-
"DELETE FROM workflow_signals WHERE execution_id = %(e)s AND stage_ref_id = %(s)s "
|
|
404
|
-
"AND consumed = FALSE AND stabilize_tenant = %(tenant)s",
|
|
405
|
-
{"e": execution_id, "s": stage_ref_id, "tenant": self._tenant},
|
|
406
|
-
)
|
|
407
|
-
return int(cur.rowcount or 0)
|
|
408
|
-
|
|
409
321
|
def try_lock_recovery(self, key: str) -> bool:
|
|
410
322
|
with self._conn.cursor() as cur:
|
|
411
323
|
cur.execute(
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"""Signal rows and the stage row lock on the transaction's own connection (PostgreSQL)."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
import logging
|
|
7
|
+
from typing import TYPE_CHECKING, Any
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from stabilize.models.stage import StageExecution
|
|
11
|
+
|
|
12
|
+
logger = logging.getLogger(__name__)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class PostgresSignalTransactionMixin:
|
|
16
|
+
_conn: Any
|
|
17
|
+
_tenant: str
|
|
18
|
+
_store: Any
|
|
19
|
+
|
|
20
|
+
def _discard_if_complete(self, stage: StageExecution) -> None:
|
|
21
|
+
if not stage.status.is_complete or not self._store.supports_signal_storage():
|
|
22
|
+
return
|
|
23
|
+
with self._conn.cursor() as cur:
|
|
24
|
+
cur.execute(
|
|
25
|
+
"DELETE FROM workflow_signals WHERE consumed = FALSE AND stabilize_tenant = %(tenant)s "
|
|
26
|
+
"AND stage_ref_id = %(ref)s AND execution_id = (SELECT execution_id FROM stage_executions "
|
|
27
|
+
"WHERE id = %(stage_id)s AND stabilize_tenant = %(tenant)s)",
|
|
28
|
+
{"tenant": self._tenant, "ref": stage.ref_id, "stage_id": stage.id},
|
|
29
|
+
)
|
|
30
|
+
dropped = int(cur.rowcount or 0)
|
|
31
|
+
if dropped:
|
|
32
|
+
logger.warning(
|
|
33
|
+
"Discarded %d pending signal(s) on stage %s entering %s", dropped, stage.id, stage.status.name
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
def lock_stage(self, stage_id: str) -> str | None:
|
|
37
|
+
with self._conn.cursor() as cur:
|
|
38
|
+
cur.execute(
|
|
39
|
+
"SELECT status FROM stage_executions WHERE id = %(id)s AND stabilize_tenant = %(tenant)s FOR UPDATE",
|
|
40
|
+
{"id": stage_id, "tenant": self._tenant},
|
|
41
|
+
)
|
|
42
|
+
row = cur.fetchone()
|
|
43
|
+
if row is None:
|
|
44
|
+
return None
|
|
45
|
+
return str(row["status"] if isinstance(row, dict) else row[0])
|
|
46
|
+
|
|
47
|
+
def consume_signal(
|
|
48
|
+
self,
|
|
49
|
+
execution_id: str,
|
|
50
|
+
stage_ref_id: str,
|
|
51
|
+
signal_name: str | None = None,
|
|
52
|
+
*,
|
|
53
|
+
row_id: int | None = None,
|
|
54
|
+
) -> dict[str, Any] | None:
|
|
55
|
+
clauses = ""
|
|
56
|
+
params: dict[str, Any] = {"e": execution_id, "s": stage_ref_id, "tenant": self._tenant}
|
|
57
|
+
if signal_name:
|
|
58
|
+
clauses += " AND signal_name = %(name)s"
|
|
59
|
+
params["name"] = signal_name
|
|
60
|
+
if row_id is not None:
|
|
61
|
+
clauses += " AND id = %(row_id)s"
|
|
62
|
+
params["row_id"] = row_id
|
|
63
|
+
with self._conn.cursor() as cur:
|
|
64
|
+
cur.execute(
|
|
65
|
+
"UPDATE workflow_signals SET consumed = TRUE, consumed_at = NOW() WHERE id = ("
|
|
66
|
+
"SELECT id FROM workflow_signals WHERE execution_id = %(e)s AND stage_ref_id = %(s)s "
|
|
67
|
+
f"AND stabilize_tenant = %(tenant)s AND consumed = FALSE{clauses} "
|
|
68
|
+
"ORDER BY id FOR UPDATE SKIP LOCKED LIMIT 1) RETURNING signal_name, signal_data",
|
|
69
|
+
params,
|
|
70
|
+
)
|
|
71
|
+
row = cur.fetchone()
|
|
72
|
+
if not row:
|
|
73
|
+
return None
|
|
74
|
+
if isinstance(row, dict):
|
|
75
|
+
return {"signal_name": row["signal_name"], "signal_data": row["signal_data"] or {}}
|
|
76
|
+
return {"signal_name": row[0], "signal_data": row[1] or {}}
|
|
77
|
+
|
|
78
|
+
def buffer_signal(
|
|
79
|
+
self,
|
|
80
|
+
execution_id: str,
|
|
81
|
+
stage_ref_id: str,
|
|
82
|
+
signal_name: str,
|
|
83
|
+
signal_data: dict[str, Any] | None = None,
|
|
84
|
+
*,
|
|
85
|
+
consumed: bool = False,
|
|
86
|
+
user: str = "",
|
|
87
|
+
persistent: bool = True,
|
|
88
|
+
) -> int:
|
|
89
|
+
with self._conn.cursor() as cur:
|
|
90
|
+
cur.execute(
|
|
91
|
+
"INSERT INTO workflow_signals (execution_id, stage_ref_id, signal_name, signal_data, consumed, "
|
|
92
|
+
"consumed_at, signal_user, persistent, stabilize_tenant) VALUES (%(e)s, %(s)s, %(n)s, %(d)s, %(c)s, "
|
|
93
|
+
"CASE WHEN %(c)s THEN NOW() ELSE NULL END, %(u)s, %(p)s, %(tenant)s) RETURNING id",
|
|
94
|
+
{
|
|
95
|
+
"e": execution_id,
|
|
96
|
+
"s": stage_ref_id,
|
|
97
|
+
"n": signal_name,
|
|
98
|
+
"d": json.dumps(signal_data or {}, default=str),
|
|
99
|
+
"c": consumed,
|
|
100
|
+
"u": user,
|
|
101
|
+
"p": persistent,
|
|
102
|
+
"tenant": self._tenant,
|
|
103
|
+
},
|
|
104
|
+
)
|
|
105
|
+
row = cur.fetchone()
|
|
106
|
+
if not row:
|
|
107
|
+
return 0
|
|
108
|
+
return int(row["id"] if isinstance(row, dict) else row[0])
|
|
109
|
+
|
|
110
|
+
def discard_signals(self, execution_id: str, stage_ref_id: str) -> int:
|
|
111
|
+
with self._conn.cursor() as cur:
|
|
112
|
+
cur.execute(
|
|
113
|
+
"DELETE FROM workflow_signals WHERE execution_id = %(e)s AND stage_ref_id = %(s)s "
|
|
114
|
+
"AND consumed = FALSE AND stabilize_tenant = %(tenant)s",
|
|
115
|
+
{"e": execution_id, "s": stage_ref_id, "tenant": self._tenant},
|
|
116
|
+
)
|
|
117
|
+
return int(cur.rowcount or 0)
|
|
@@ -105,6 +105,12 @@ class SqliteTransactionOps:
|
|
|
105
105
|
).fetchall()
|
|
106
106
|
return [str(r[0]) for r in rows]
|
|
107
107
|
|
|
108
|
+
def lock_stage(self, stage_id: str) -> str | None:
|
|
109
|
+
row = self._conn.execute(
|
|
110
|
+
"SELECT status FROM stage_executions WHERE id = ? AND stabilize_tenant = ?", (stage_id, self._tenant)
|
|
111
|
+
).fetchone()
|
|
112
|
+
return None if row is None else str(row[0])
|
|
113
|
+
|
|
108
114
|
def consume_signal(
|
|
109
115
|
self,
|
|
110
116
|
execution_id: str,
|
|
@@ -131,6 +131,10 @@ class StoreTransaction(ABC):
|
|
|
131
131
|
"""Delete a synthetic stage, its tasks, its claims and its queued messages."""
|
|
132
132
|
raise NotImplementedError(f"{type(self).__name__} cannot remove stages")
|
|
133
133
|
|
|
134
|
+
def lock_stage(self, stage_id: str) -> str | None:
|
|
135
|
+
"""Lock the stage row until this transaction ends and return its status name; None when unsupported."""
|
|
136
|
+
return None
|
|
137
|
+
|
|
134
138
|
def consume_signal(
|
|
135
139
|
self,
|
|
136
140
|
execution_id: str,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stabilize-0.34.2 → stabilize-0.34.3}/migrations/01KDQ4N9QPJ6Q4MCV3V9GHWPV4_initial_schema.sql
RENAMED
|
File without changes
|
|
File without changes
|
{stabilize-0.34.2 → stabilize-0.34.3}/migrations/01KE4YJT2W8A6NBX5R7CQMJK84_add_dlq_table.sql
RENAMED
|
File without changes
|
|
File without changes
|
{stabilize-0.34.2 → stabilize-0.34.3}/migrations/01KE60R04X0C8QDTS9SEESMN96_add_task_version.sql
RENAMED
|
File without changes
|
{stabilize-0.34.2 → stabilize-0.34.3}/migrations/01KFA6JDAS811CB5RKPD1FBAST_add_stage_version.sql
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stabilize-0.34.2 → stabilize-0.34.3}/migrations/01KWHFBW2B5VZJENEA3D8Z2YPW_add_stage_claims.sql
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stabilize-0.34.2 → stabilize-0.34.3}/migrations/01M64SFQG36NHV5KQ3SHH5Z832_event_store_tables.sql
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stabilize-0.34.2 → stabilize-0.34.3}/migrations/01M684KJKQKEY9RG0RPEZ43GW1_tenant_indexes.sql
RENAMED
|
File without changes
|
{stabilize-0.34.2 → stabilize-0.34.3}/migrations/01M68BCSDHR6ECPVVESPS8WJC4_task_generation.sql
RENAMED
|
File without changes
|
{stabilize-0.34.2 → stabilize-0.34.3}/migrations/01M68FGEZVQR6KPAMW6P5N8B0E_recovery_activity.sql
RENAMED
|
File without changes
|
{stabilize-0.34.2 → stabilize-0.34.3}/migrations/01M68J0WB7ASSYV0JQYBA2KAQM_signal_delivery.sql
RENAMED
|
File without changes
|
{stabilize-0.34.2 → stabilize-0.34.3}/migrations/01M68P99JK1H6MC1W6RZ0SNHH0_definition_version.sql
RENAMED
|
File without changes
|
{stabilize-0.34.2 → stabilize-0.34.3}/migrations/01M68PK3W1DW3T8GZ3YKE3SVSJ_redelivery_budget.sql
RENAMED
|
File without changes
|
|
File without changes
|
{stabilize-0.34.2 → stabilize-0.34.3}/migrations/01M68V88TB2FZ4AG6AH1QW3YY4_subscription_cursor.sql
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|