Skip to content

Commit

Permalink
operator fixes: (#1639)
Browse files Browse the repository at this point in the history
- give more time for 'starting' before switching to 'waiting_capacity',
150 sec instead of 60
- allow switching to complete from any starting/running type, including
waiting_capacity
  • Loading branch information
ikreymer authored Mar 29, 2024
1 parent 9f19ff7 commit e3f03ef
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions backend/btrixcloud/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
REDIS_TTL = 60

# time in seconds before a crawl is deemed 'waiting' instead of 'starting'
STARTING_TIME_SECS = 60
STARTING_TIME_SECS = 150

# how often to update execution time seconds
EXEC_TIME_UPDATE_SECS = 60
Expand Down Expand Up @@ -1501,10 +1501,7 @@ async def mark_finished(
if stats:
kwargs["stats"] = stats

if state in SUCCESSFUL_STATES:
allowed_from = RUNNING_STATES
else:
allowed_from = RUNNING_AND_STARTING_STATES
allowed_from = RUNNING_AND_STARTING_STATES

# if set_state returns false, already set to same status, return
if not await self.set_state(
Expand Down

0 comments on commit e3f03ef

Please sign in to comment.