Skip to content

refactor: split py_queue/workflow_ops.rs into submodule#97

Merged
pratyush618 merged 1 commit intomasterfrom
refactor/workflow-ops-split
May 1, 2026
Merged

refactor: split py_queue/workflow_ops.rs into submodule#97
pratyush618 merged 1 commit intomasterfrom
refactor/workflow-ops-split

Conversation

@pratyush618
Copy link
Copy Markdown
Collaborator

Summary

  • Convert flat py_queue/workflow_ops.rs (1004 lines) into a py_queue/workflow_ops/ submodule
  • Each submodule holds a partial #[pymethods] impl PyQueue block (enabled by pyo3's multiple-pymethods feature, already in use)
  • Largest submodule: lifecycle.rs at 320 lines

What moved where

  • workflow_ops/mod.rs — module declarations + shared helpers (workflow_storage, parse_step_metadata, build_metadata_json, status_to_py, cascade_skip_pending_nodes)
  • workflow_ops/lifecycle.rssubmit_workflow, cancel_workflow_run, finalize_run_if_terminal
  • workflow_ops/nodes.rsmark_workflow_node_result, set_workflow_node_waiting_approval, set_workflow_node_running, set_workflow_node_fan_out_count, fail_workflow_node, skip_workflow_node
  • workflow_ops/fan_out.rsexpand_fan_out, create_deferred_job, check_fan_out_completion
  • workflow_ops/gates.rsresolve_workflow_gate
  • workflow_ops/queries.rsget_workflow_run_status, get_base_run_node_data, get_workflow_definition_dag

Test plan

  • cargo check --workspace
  • cargo check --workspace --features postgres
  • cargo check --workspace --features redis
  • cargo check --workspace --features native-async
  • cargo clippy --workspace --features redis
  • cargo test --workspace — all 78 tests pass
  • uv run maturin develop && uv run python -m pytest tests/python/ -v — 465 passed, 9 skipped (workflow tests: 75 passed)
  • No public API changes

Move 1004-line workflow_ops.rs into a folder module split by concern:
lifecycle, nodes, fan_out, gates, queries. Each submodule holds a
partial #[pymethods] impl block. No behavior changes.
@github-actions github-actions Bot added the rust label May 1, 2026
@pratyush618 pratyush618 merged commit 6760c7d into master May 1, 2026
19 checks passed
@pratyush618 pratyush618 deleted the refactor/workflow-ops-split branch May 2, 2026 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant