Clear expired Django sessions regularly from DB
A random minute in the 21st hour UTC, daily, was chosen arbitrarily. That it is run on a single arbitrary host from the set was done to prevent unnecessary work being done until Bug #1424705 provides us with a cleaner solution. Adjusted to run once per day just to be sure that the operation doesn't lock the table for a meaningful duration. Making this configurable or tunable does not seem to be necessary at this time. Change-Id: I87164926a4d6a65d3c9f733d625a2d4af91c2597 Closes-Bug: #1466126
This commit is contained in:
parent
f7eed7e7fb
commit
4ab9496724
@ -46,3 +46,14 @@
|
|||||||
tags:
|
tags:
|
||||||
- horizon-db-sync
|
- horizon-db-sync
|
||||||
- horizon-setup
|
- horizon-setup
|
||||||
|
|
||||||
|
- name: Register DB session cleanup cron
|
||||||
|
cron:
|
||||||
|
name: "Clear out expired sessions"
|
||||||
|
minute: "{{ 58 | random(start=2) }}"
|
||||||
|
hour: 21
|
||||||
|
job: "/usr/local/bin/horizon-manage.py clearsessions"
|
||||||
|
user: "{{ horizon_system_user_name }}"
|
||||||
|
state: present
|
||||||
|
tags:
|
||||||
|
- horizon-db-setup
|
||||||
|
Loading…
x
Reference in New Issue
Block a user