Skip to content

Commit

Permalink
refactor: Paused -> Waiting
Browse files Browse the repository at this point in the history
  • Loading branch information
morgsmccauley committed Jul 17, 2024
1 parent 33ba8e7 commit fe7a158
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions block-streamer/proto/block_streamer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ enum ProcessingState {
IDLE = 1;
// Running as expected
RUNNING = 2;
// Intentionally paused due to some internal condition
PAUSED = 3;
// Waiting for some internal condition to be met before continuing
WAITING = 3;
// Stopped due to some unknown error
STALLED = 4;
}
4 changes: 2 additions & 2 deletions block-streamer/src/block_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ pub enum ProcessingState {

/// Block Stream has been intentionally/internally paused due to some condition, i.e. back pressure on
/// the Redis Stream.
Paused,
Waiting,

/// Block Stream has stalled due to an error or other condition. Must be manually
/// restarted.
Expand Down Expand Up @@ -180,7 +180,7 @@ impl BlockStream {
health_lock.processing_state = ProcessingState::Stalled;
}
Ordering::Equal if stream_size >= Some(MAX_STREAM_SIZE) => {
health_lock.processing_state = ProcessingState::Paused;
health_lock.processing_state = ProcessingState::Waiting;
}
Ordering::Equal => {
health_lock.processing_state = ProcessingState::Stalled;
Expand Down
4 changes: 2 additions & 2 deletions block-streamer/src/server/block_streamer_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ impl From<block_stream::BlockStreamHealth> for blockstreamer::Health {
block_stream::ProcessingState::Stalled => {
blockstreamer::ProcessingState::Stalled as i32
}
block_stream::ProcessingState::Paused => {
blockstreamer::ProcessingState::Paused as i32
block_stream::ProcessingState::Waiting => {
blockstreamer::ProcessingState::Waiting as i32
}
},
updated_at_timestamp_secs: health
Expand Down

0 comments on commit fe7a158

Please sign in to comment.