reduced redis access count
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
f6d36a9f87
commit
ba8718054b
@ -66,9 +66,10 @@ class AssignmentView(FlaskView):
|
|||||||
|
|
||||||
if default_target:
|
if default_target:
|
||||||
target_site = default_target
|
target_site = default_target
|
||||||
redis_client.set(schedule_store_key, default_target)
|
redis_client.set(schedule_store_key, default_target, ex=current_app.config['DEVICE_TIMEOUT'])
|
||||||
|
|
||||||
# Update (or set) TTL
|
else:
|
||||||
|
# Just Update TTL
|
||||||
redis_client.expire(
|
redis_client.expire(
|
||||||
schedule_store_key,
|
schedule_store_key,
|
||||||
current_app.config['DEVICE_TIMEOUT']
|
current_app.config['DEVICE_TIMEOUT']
|
||||||
|
Loading…
Reference in New Issue
Block a user