mirror of
https://github.com/dkmstr/openuds.git
synced 2025-01-03 01:17:56 +03:00
Improving deferred deletion performance
This commit is contained in:
parent
ad9d3532ee
commit
b1ee7656c8
@ -32,7 +32,7 @@ Author: Adolfo Gómez, dkmaster at dkmon dot com
|
||||
"""
|
||||
import typing
|
||||
|
||||
SUGGESTED_CHECK_INTERVAL: typing.Final[int] = 10 # In seconds
|
||||
SUGGESTED_CHECK_INTERVAL: typing.Final[int] = 8 # In seconds
|
||||
MAX_RETRIES: typing.Final[int] = 7 * 24 * 60 // SUGGESTED_CHECK_INTERVAL # 7 days
|
||||
MAX_STATE_CHECKS: typing.Final[int] = 32 # Max number of state checks before giving up
|
||||
|
||||
|
@ -93,7 +93,7 @@ class StateUpdater(abc.ABC):
|
||||
logger.debug(
|
||||
'Running Executor for %s with state %s and executor %s',
|
||||
self.user_service.friendly_name,
|
||||
types.states.State.from_str(state).localized,
|
||||
types.states.TaskState.from_str(state),
|
||||
executor,
|
||||
)
|
||||
|
||||
|
@ -54,7 +54,6 @@ RETRIES_TO_RETRY: typing.Final[int] = (
|
||||
32 # Retries to stop again or to shutdown again in STOPPING_GROUP or DELETING_GROUP
|
||||
)
|
||||
MAX_DELETIONS_AT_ONCE: typing.Final[int] = 32
|
||||
MAX_DELETIONS_CHECKED_AT_ONCE: typing.Final[int] = MAX_DELETIONS_AT_ONCE * 2
|
||||
|
||||
# This interval is how long will take to check again for deletion, stopping, etc...
|
||||
# That is, once a machine is deleted, every 32 seconds will be check that it has been deleted
|
||||
|
Loading…
Reference in New Issue
Block a user