10637.3.1
by Guilherme Salgado
Use the default python version instead of a hard-coded version |
1 |
#!/usr/bin/python -S
|
8687.15.7
by Karl Fogel
Add the copyright header block to more files. |
2 |
#
|
3 |
# Copyright 2009 Canonical Ltd. This software is licensed under the
|
|
4 |
# GNU Affero General Public License version 3 (see the file LICENSE).
|
|
7548.6.1
by Julian Edwards
First stab at cronscript for expiring ppa binaries. Tests to come. |
5 |
|
6 |
# pylint: disable-msg=C0103,W0403
|
|
7 |
||
8 |
# This script expires PPA binaries that are superseded or deleted, and
|
|
9 |
# are older than 30 days. It's done with pure SQL rather than Python
|
|
10 |
# for speed reasons.
|
|
11 |
||
12 |
import _pythonpath |
|
13 |
||
14 |
from canonical.config import config |
|
10466.3.1
by Muharem Hrnjadovic
renamed ppa-binary-expiry to archive-file-expiry since the script is not to expire sources/binaries in partner archives as well. |
15 |
from lp.soyuz.scripts.expire_archive_files import ArchiveExpirer |
7548.6.3
by Julian Edwards
Split cronscript out to a separate script file so it can be tested more easily. |
16 |
|
7548.6.1
by Julian Edwards
First stab at cronscript for expiring ppa binaries. Tests to come. |
17 |
|
18 |
if __name__ == '__main__': |
|
10466.3.1
by Muharem Hrnjadovic
renamed ppa-binary-expiry to archive-file-expiry since the script is not to expire sources/binaries in partner archives as well. |
19 |
script = ArchiveExpirer( |
20 |
'expire-archive-files', dbuser=config.binaryfile_expire.dbuser) |
|
7548.6.1
by Julian Edwards
First stab at cronscript for expiring ppa binaries. Tests to come. |
21 |
script.lock_and_run() |
22 |