operator: adjust state transition rules to ensure 'running' state always accounted for in db (#1989)
don't rely on current status, always set state to running when running to ensure idempotency in case of multiple calls
This commit is contained in:
parent
1c153dfd3c
commit
4a2725aaa6
@ -807,8 +807,6 @@ class CrawlOperator(BaseOperator):
|
|||||||
status.resync_after = self.fast_retry_secs
|
status.resync_after = self.fast_retry_secs
|
||||||
return status
|
return status
|
||||||
|
|
||||||
# set state to running (if not already)
|
|
||||||
if status.state not in RUNNING_STATES:
|
|
||||||
# if true (state is set), also run webhook
|
# if true (state is set), also run webhook
|
||||||
if await self.set_state(
|
if await self.set_state(
|
||||||
"running",
|
"running",
|
||||||
|
Loading…
Reference in New Issue
Block a user