From 6cb802c835ab4ba77cc93fe90f4088f48a7df7e6 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Sun, 6 Jun 2010 10:43:53 +0100 Subject: [PATCH] Fixes cronjob to process the 50 oldest API keys --- 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 b9738a6..91a2256 100644 --- a/eve_api/cron.py +++ b/eve_api/cron.py @@ -28,7 +28,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))[:self.batches] + accounts = EVEAccount.objects.filter(api_last_updated__lt=(datetime.datetime.now() - delta)).order_by('api_last_updated').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)