Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion state-manager/app/controller/manual_retry_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ async def manual_retry_state(namespace_name: str, state_id: PydanticObjectId, bo
error=None,
parents=state.parents,
does_unites=state.does_unites,
fanout_id=body.fanout_id # this will ensure that multiple unwanted retries are not formed because of index in database
fanout_id=body.fanout_id, # this will ensure that multiple unwanted retries are not formed because of index in database
manul_retry_fanout_id=body.fanout_id
Comment thread
NiveditJain marked this conversation as resolved.
Outdated
)
retry_state = await retry_state.insert()
logger.info(f"Retry state {retry_state.id} created for state {state_id}", x_exosphere_request_id=x_exosphere_request_id)
Expand Down
2 changes: 2 additions & 0 deletions state-manager/app/models/db/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class State(BaseDatabaseModel):
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")
retry_count: int = Field(default=0, description="Number of times the state has been retried")
fanout_id: str = Field(default_factory=lambda: str(uuid.uuid4()), description="Fanout ID of the state")
manul_retry_fanout_id: str = Field(default="", description="Fanout ID of the state that is manually retried")
Comment thread
NiveditJain marked this conversation as resolved.
Outdated

@before_event([Insert, Replace, Save])
def _generate_fingerprint(self):
Expand All @@ -42,6 +43,7 @@ def _generate_fingerprint(self):
"run_id": self.run_id,
"retry_count": self.retry_count,
"parents": {k: str(v) for k, v in self.parents.items()},
"manul_retry_fanout_id": self.manul_retry_fanout_id,
Comment thread
NiveditJain marked this conversation as resolved.
Outdated
}
payload = json.dumps(
data,
Expand Down
Loading