Unverified Commit fea5bce8 by Feanil Patel Committed by GitHub

Merge pull request #4314 from open-craft/clemente/add-cron-clearsessions-upstream

Add role to call the "clearsessions" management command
parents 3752d130 9607b79e
......@@ -790,6 +790,14 @@ EDXAPP_SESSION_SAVE_EVERY_REQUEST: false
EDXAPP_SESSION_COOKIE_SECURE: false
# Optionally add a cron job to run the "clearsessions" management command to delete expired sessions
# Hours and minutes follow cron syntax.
# E.g. "15,19" hours and "0" minutes will run it at 15:00 and 19:00.
# "*" hours and "5" minutes will run it every hour at past 5 minutes.
EDXAPP_CLEARSESSIONS_CRON_ENABLED: false
EDXAPP_CLEARSESSIONS_CRON_HOURS: "14"
EDXAPP_CLEARSESSIONS_CRON_MINUTES: "0"
EDXAPP_VIDEO_IMAGE_MAX_AGE: 31536000
# This is django storage configuration for Video Image settings.
......
......@@ -450,3 +450,13 @@
tags:
- install
- install:base
- name: install cron job to run clearsessions
cron:
name: "clear expired Django sessions"
user: "{{ edxapp_user }}"
job: "{{ edxapp_venv_bin }}/python {{ edxapp_code_dir }}/manage.py lms clearsessions --settings={{ edxapp_settings }} >/dev/null 2>&1"
hour: "{{ EDXAPP_CLEARSESSIONS_CRON_HOURS }}"
minute: "{{ EDXAPP_CLEARSESSIONS_CRON_MINUTES }}"
day: "*"
when: EDXAPP_CLEARSESSIONS_CRON_ENABLED
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment