Merge "Run bandersnatch under file locking and a timeout"

This commit is contained in:
Jenkins 2014-10-06 15:06:53 +00:00 committed by Gerrit Code Review
commit 8eadad6b26
1 changed files with 5 additions and 1 deletions

View File

@ -55,9 +55,13 @@ class openstack_project::pypi_mirror (
ensure => directory,
}
file { '/var/run/bandersnatch':
ensure => directory,
}
cron { 'bandersnatch':
minute => '*/5',
command => 'run-bandersnatch >>/var/log/bandersnatch/mirror.log 2>&1',
command => 'flock -n /var/run/bandersnatch/mirror.lock timeout -k 2m 30m run-bandersnatch >>/var/log/bandersnatch/mirror.log 2>&1',
environment => 'PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin',
}