mirror of
https://github.com/dkmstr/openuds.git
synced 2025-01-04 05:17:54 +03:00
Refactor suggested check interval for fixed user service
This commit is contained in:
parent
fa24a5e4f4
commit
9e0266d26b
@ -35,6 +35,7 @@ import typing
|
|||||||
HOURS_BEFORE_CONSIDERED_LOCKED: typing.Final[int] = 2 # In hours
|
HOURS_BEFORE_CONSIDERED_LOCKED: typing.Final[int] = 2 # In hours
|
||||||
|
|
||||||
USRV_SUGGESTED_CHECK_INTERVAL: typing.Final[int] = 8 # In seconds
|
USRV_SUGGESTED_CHECK_INTERVAL: typing.Final[int] = 8 # In seconds
|
||||||
|
USRV_FIXED_SUGGESTED_CHECK_INTERVAL: typing.Final[int] = 2 # In seconds
|
||||||
USRV_MAX_RETRIES: typing.Final[int] = 24 * 3600 // USRV_SUGGESTED_CHECK_INTERVAL # 1 day
|
USRV_MAX_RETRIES: typing.Final[int] = 24 * 3600 // USRV_SUGGESTED_CHECK_INTERVAL # 1 day
|
||||||
USRV_MAX_STATE_CHECKS: typing.Final[int] = (
|
USRV_MAX_STATE_CHECKS: typing.Final[int] = (
|
||||||
HOURS_BEFORE_CONSIDERED_LOCKED * 3600 // USRV_SUGGESTED_CHECK_INTERVAL
|
HOURS_BEFORE_CONSIDERED_LOCKED * 3600 // USRV_SUGGESTED_CHECK_INTERVAL
|
||||||
|
@ -68,7 +68,7 @@ class FixedUserService(services.UserService, autoserializable.AutoSerializable,
|
|||||||
- FINISH
|
- FINISH
|
||||||
"""
|
"""
|
||||||
|
|
||||||
suggested_delay = consts.services.USRV_SUGGESTED_CHECK_INTERVAL
|
suggested_delay = consts.services.USRV_FIXED_SUGGESTED_CHECK_INTERVAL
|
||||||
# How many times we will check for a state before giving up
|
# How many times we will check for a state before giving up
|
||||||
max_state_checks: typing.ClassVar[int] = consts.services.USRV_MAX_STATE_CHECKS
|
max_state_checks: typing.ClassVar[int] = consts.services.USRV_MAX_STATE_CHECKS
|
||||||
# How many "retries" operation on same state will be allowed before giving up
|
# How many "retries" operation on same state will be allowed before giving up
|
||||||
|
Loading…
Reference in New Issue
Block a user