From 4c415f6493e92e1406a61e477a4016d908da5b2f Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Sat, 11 Sep 2010 19:26:24 +0100 Subject: [PATCH] Exclude expired API keys (as per new CCP guidelines) --- eve_api/cron.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eve_api/cron.py b/eve_api/cron.py index f6b2a73..e4165ed 100644 --- a/eve_api/cron.py +++ b/eve_api/cron.py @@ -30,7 +30,7 @@ class UpdateAPIs(): delta = datetime.timedelta(seconds=self.last_update_delay) self._logger.debug("Updating APIs older than %s" % (datetime.datetime.now() - delta)) - accounts = EVEAccount.objects.filter(api_last_updated__lt=(datetime.datetime.now() - delta)).order_by('api_last_updated').order_by('api_last_updated')[:self.batches] + accounts = EVEAccount.objects.filter(api_last_updated__lt=(datetime.datetime.now() - delta)).exclude(api_status=API_STATUS_ACC_EXPIRED).order_by('api_last_updated')[:self.batches] self._logger.debug("%s account(s) to update" % len(accounts)) for acc in accounts: self._logger.info("Updating UserID %s" % acc.api_user_id)