You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement retry policy and enhance errored state handling
- Added a retry policy model to manage state retries with configurable methods (fixed, linear, exponential).
- Updated the errored state function to create a retry state if the maximum retries have not been reached, improving error recovery.
- Enhanced the ErroredResponseModel to include a flag indicating whether a retry state was created.
- Modified the GraphTemplate and State models to incorporate retry policy attributes, ensuring better state management.
- Improved validation and error handling in the upsert_graph_template function to accommodate the new retry policy structure.
Copy file name to clipboardExpand all lines: state-manager/app/models/db/state.py
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@ class State(BaseDatabaseModel):
24
24
does_unites: bool=Field(default=False, description="Whether this state unites other states")
25
25
state_fingerprint: str=Field(default="", description="Fingerprint of the state")
26
26
enqueue_after: int=Field(default_factory=lambda: int(time.time() *1000), gt=0, description="Unix time in milliseconds after which the state should be enqueued")
27
+
retry_count: int=Field(default=0, description="Number of times the state has been retried")
0 commit comments