1
0
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:
Adolfo Gómez García 2024-07-09 18:05:58 +02:00
parent ad9d3532ee
commit b1ee7656c8
No known key found for this signature in database
GPG Key ID: DD1ABF20724CDA23
3 changed files with 2 additions and 3 deletions

View File

@ -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

View File

@ -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,
)

View File

@ -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