Class PostgreSqlFlowScheduleStateStore
- Namespace
- FlowOrchestrator.PostgreSQL
- Assembly
- FlowOrchestrator.PostgreSQL.dll
PostgreSQL implementation of IFlowScheduleStateStore that persists cron overrides
and pause state in the flow_schedule_states table using upsert semantics.
public sealed class PostgreSqlFlowScheduleStateStore : IFlowScheduleStateStore
- Inheritance
-
PostgreSqlFlowScheduleStateStore
- Implements
- Inherited Members
Constructors
PostgreSqlFlowScheduleStateStore(string)
Initialises the store with the given Npgsql connection string.
public PostgreSqlFlowScheduleStateStore(string connectionString)
Parameters
connectionStringstringPostgreSQL connection string for the FlowOrchestrator database.
Methods
DeleteAsync(string)
Removes the schedule state for the given job ID if it exists.
public Task DeleteAsync(string jobId)
Parameters
jobIdstring
Returns
GetAllAsync()
Returns all persisted schedule states.
public Task<IReadOnlyList<FlowScheduleState>> GetAllAsync()
Returns
GetAsync(string)
Returns the schedule state for the given Hangfire recurring job ID, or null if no override has been saved.
public Task<FlowScheduleState?> GetAsync(string jobId)
Parameters
jobIdstring
Returns
SaveAsync(FlowScheduleState)
Inserts or replaces the schedule state for JobId.
public Task SaveAsync(FlowScheduleState state)
Parameters
stateFlowScheduleState