mirror of
https://github.com/dkmstr/openuds.git
synced 2025-01-20 14:03:49 +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
|
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_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
|
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(
|
logger.debug(
|
||||||
'Running Executor for %s with state %s and executor %s',
|
'Running Executor for %s with state %s and executor %s',
|
||||||
self.user_service.friendly_name,
|
self.user_service.friendly_name,
|
||||||
types.states.State.from_str(state).localized,
|
types.states.TaskState.from_str(state),
|
||||||
executor,
|
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
|
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_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...
|
# 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
|
# That is, once a machine is deleted, every 32 seconds will be check that it has been deleted
|
||||||
|
Loading…
x
Reference in New Issue
Block a user