Create logs for update_review
The cron job looks failing, put the output to a log file. Setup log file path and logrotate for it. Change-Id: Ie26e5a9f07ae122842338cf833d4462a9ce7559f
This commit is contained in:
parent
b5aa6662cb
commit
b02d9846ca
|
@ -38,6 +38,27 @@ class reviewday {
|
||||||
require => Group['reviewday'],
|
require => Group['reviewday'],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
file { '/var/log/reviewday.log':
|
||||||
|
ensure => file,
|
||||||
|
owner => 'reviewday',
|
||||||
|
group => 'reviewday',
|
||||||
|
mode => '0644',
|
||||||
|
require => User['reviewday'],
|
||||||
|
}
|
||||||
|
|
||||||
|
include ::logrotate
|
||||||
|
logrotate::file { 'reviewday':
|
||||||
|
log => '/var/log/reviewday.log',
|
||||||
|
options => [
|
||||||
|
'compress',
|
||||||
|
'copytruncate',
|
||||||
|
'missingok',
|
||||||
|
'rotate 7',
|
||||||
|
'daily',
|
||||||
|
'notifempty',
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# vim:sw=2:ts=2:expandtab:textwidth=79
|
# vim:sw=2:ts=2:expandtab:textwidth=79
|
||||||
|
|
|
@ -105,7 +105,7 @@ define reviewday::site(
|
||||||
}
|
}
|
||||||
|
|
||||||
cron { 'update reviewday':
|
cron { 'update reviewday':
|
||||||
command => "cd /var/lib/reviewday/reviewday && PYTHONPATH=\$PWD flock -n /var/lib/reviewday/update.lock python bin/reviewday -o ${httproot}",
|
command => "cd /var/lib/reviewday/reviewday && PYTHONPATH=\$PWD flock -n /var/lib/reviewday/update.lock python bin/reviewday -o ${httproot} >> /var/log/reviewday.log 2>&1",
|
||||||
minute => '*/30',
|
minute => '*/30',
|
||||||
user => 'reviewday',
|
user => 'reviewday',
|
||||||
require => Exec['install-reviewday-dependencies'],
|
require => Exec['install-reviewday-dependencies'],
|
||||||
|
|
Loading…
Reference in New Issue