Add koji cleanup sessions on koji database server.

This commit is contained in:
Kevin Fenzi 2014-10-01 20:29:25 +00:00
parent 70924e6a89
commit 1dc2945f12
2 changed files with 15 additions and 0 deletions

View file

@ -0,0 +1,6 @@
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root@fedoraproject.org
HOME=/
0 0 * * * postgres /usr/bin/psql -q -c "DELETE FROM sessions WHERE update_time < now() - '1 day'::interval" koji

View file

@ -72,3 +72,12 @@
tags:
- cron
- postgresql
- name: Set up a cron job to clean long koji sessions on koji database server only
copy: >
src=koji-cleanup-sessions.cron
dest=/etc/cron.d/koji-cleanup-sessions.cron
when: inventory_hostname.startswith('db-koji01')
tags:
- cron
- postgresql