Skip to content

Commit

Permalink
Refactor suggested check interval for fixed user service
Browse files Browse the repository at this point in the history
  • Loading branch information
dkmstr committed Oct 3, 2024
1 parent fa24a5e commit 9e0266d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions server/src/uds/core/consts/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
HOURS_BEFORE_CONSIDERED_LOCKED: typing.Final[int] = 2 # In hours

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_STATE_CHECKS: typing.Final[int] = (
HOURS_BEFORE_CONSIDERED_LOCKED * 3600 // USRV_SUGGESTED_CHECK_INTERVAL
Expand Down
2 changes: 1 addition & 1 deletion server/src/uds/core/services/generics/fixed/userservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class FixedUserService(services.UserService, autoserializable.AutoSerializable,
- 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
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
Expand Down

0 comments on commit 9e0266d

Please sign in to comment.