diff options
Diffstat (limited to 'store/management/commands/expire-downloads.py')
-rw-r--r-- | store/management/commands/expire-downloads.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/store/management/commands/expire-downloads.py b/store/management/commands/expire-downloads.py index 94b0d24..012182e 100644 --- a/store/management/commands/expire-downloads.py +++ b/store/management/commands/expire-downloads.py @@ -39,7 +39,7 @@ from django.conf import settings from store.utilities import downloadPath class Command(BaseCommand): - help = 'Expires all downloads that are older than 10 minutes' + help = 'Expires all downloads that are older than APPSTORE_DOWNLOAD_EXPIRY minutes' def handle(self, *args, **options): self.stdout.write('Removing expired download packages') @@ -50,7 +50,7 @@ class Command(BaseCommand): for pkg in os.listdir(pkgPath): t = os.path.getmtime(pkgPath + pkg) age = time.time() - t - if age > (10 * 60): + if age > (int(settings.APPSTORE_DOWNLOAD_EXPIRY) * 60): os.remove(pkgPath + pkg) self.stdout.write(' -> %s (age: %s seconds)' % (pkg, int(age))) |