Skip to content

Commit 3440112

Browse files
lutterclaude
andcommitted
core: Organize runner components into runner_components module
Move runner state machine types and trigger runner into a dedicated runner_components/ module to improve code organization: - Move runner_state.rs -> runner_components/state.rs - Move trigger_runner.rs -> runner_components/trigger_runner.rs - Create runner_components/mod.rs with re-exports - Update imports in runner.rs to use the new module path This completes Phase 7 of the runner refactor plan. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 0d3d31c commit 3440112

File tree

5 files changed

+15
-4
lines changed

5 files changed

+15
-4
lines changed

core/src/subgraph/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ mod instance_manager;
55
mod loader;
66
mod registrar;
77
mod runner;
8-
mod runner_state;
8+
mod runner_components;
99
mod state;
1010
mod stream;
1111
mod trigger_processor;
12-
mod trigger_runner;
1312

1413
pub use self::instance_manager::SubgraphInstanceManager;
1514
pub use self::registrar::SubgraphRegistrar;

core/src/subgraph/runner.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ use crate::subgraph::error::{
44
ProcessingErrorKind,
55
};
66
use crate::subgraph::inputs::IndexingInputs;
7-
use crate::subgraph::runner_state::{RestartReason, RunnerState, StopReason};
7+
use crate::subgraph::runner_components::{RestartReason, RunnerState, StopReason, TriggerRunner};
88
use crate::subgraph::state::IndexingState;
99
use crate::subgraph::stream::new_block_stream;
10-
use crate::subgraph::trigger_runner::TriggerRunner;
1110
use anyhow::Context as _;
1211
use graph::blockchain::block_stream::{
1312
BlockStream, BlockStreamError, BlockStreamEvent, BlockWithTriggers, FirehoseCursor,
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//! SubgraphRunner components and state management.
2+
//!
3+
//! This module contains the state machine and helper components for the SubgraphRunner:
4+
//!
5+
//! - [`state`]: Defines [`RunnerState`], [`RestartReason`], and [`StopReason`] enums
6+
//! that control the runner's lifecycle.
7+
//! - [`trigger_runner`]: Provides [`TriggerRunner`] for unified trigger execution.
8+
9+
mod state;
10+
mod trigger_runner;
11+
12+
pub use state::{RestartReason, RunnerState, StopReason};
13+
pub use trigger_runner::TriggerRunner;
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)