Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: manifests/issuesserver.pp

Issue 29369504: Issue 2924 - Move session cleanup to not collide with sync (Closed) Base URL: https://hg.adblockplus.org/infrastructure/
Patch Set: Created Dec. 22, 2016, 10:20 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 node 'issues1' { 1 node 'issues1' {
2 2
3 include private::trac 3 include private::trac
4 4
5 class {'trac': 5 class {'trac':
6 domain => 'issues.adblockplus.org', 6 domain => 'issues.adblockplus.org',
7 certificate => 'issues.adblockplus.org_sslcert.pem', 7 certificate => 'issues.adblockplus.org_sslcert.pem',
8 private_key => 'issues.adblockplus.org_sslcert.key', 8 private_key => 'issues.adblockplus.org_sslcert.key',
9 is_default => true, 9 is_default => true,
10 } 10 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 cron {'trac_session_cleanup': 64 cron {'trac_session_cleanup':
65 command => "$mysql trac --execute ' \ 65 command => "$mysql trac --execute ' \
66 DELETE session, session_attribute FROM session \ 66 DELETE session, session_attribute FROM session \
67 JOIN session_attribute ON session.sid = session_attribute.sid \ 67 JOIN session_attribute ON session.sid = session_attribute.sid \
68 AND session.authenticated = session_attribute.authenticated \ 68 AND session.authenticated = session_attribute.authenticated \
69 WHERE session.authenticated = 0 AND \ 69 WHERE session.authenticated = 0 AND \
70 session.last_visit < UNIX_TIMESTAMP(NOW() - INTERVAL 10 DAY)' >/dev/null", 70 session.last_visit < UNIX_TIMESTAMP(NOW() - INTERVAL 10 DAY)' >/dev/null",
71 ensure => present, 71 ensure => present,
72 hour => 1, 72 hour => 1,
73 minute => 0, 73 minute => 15,
74 require => Trac::Instance['issues'], 74 require => Trac::Instance['issues'],
75 user => trac, 75 user => trac,
76 } 76 }
77 77
78 cron {'trac_account_cleanup': 78 cron {'trac_account_cleanup':
79 command => "$mysql trac --execute ' \ 79 command => "$mysql trac --execute ' \
80 DELETE session, session_attribute FROM session \ 80 DELETE session, session_attribute FROM session \
81 JOIN session_attribute AS session_data ON session.sid = session_data.sid \ 81 JOIN session_attribute AS session_data ON session.sid = session_data.sid \
82 AND session.authenticated = session_data.authenticated \ 82 AND session.authenticated = session_data.authenticated \
83 JOIN session_attribute ON session.sid = session_attribute.sid \ 83 JOIN session_attribute ON session.sid = session_attribute.sid \
84 AND session.authenticated = session_attribute.authenticated \ 84 AND session.authenticated = session_attribute.authenticated \
85 WHERE session_data.name = \"email_verification_token\" AND \ 85 WHERE session_data.name = \"email_verification_token\" AND \
86 session.last_visit < UNIX_TIMESTAMP(NOW() - INTERVAL 5 DAY)' >/dev/null", 86 session.last_visit < UNIX_TIMESTAMP(NOW() - INTERVAL 5 DAY)' >/dev/null",
87 ensure => present, 87 ensure => present,
88 hour => 2, 88 hour => 2,
89 minute => 0, 89 minute => 0,
90 require => Trac::Instance['issues'], 90 require => Trac::Instance['issues'],
91 user => trac, 91 user => trac,
92 } 92 }
93 93
94 # https://issues.adblockplus.org/ticket/3787 94 # https://issues.adblockplus.org/ticket/3787
95 customservice::supervisor {"spawn-fcgi": 95 customservice::supervisor {"spawn-fcgi":
96 ensure => 'present', 96 ensure => 'present',
97 pidfile => "/var/run/500-tracd_issues_spawn-fcgi.pid", 97 pidfile => "/var/run/500-tracd_issues_spawn-fcgi.pid",
98 } 98 }
99 } 99 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld