From 3854aca02d15a3f8cc6f6844bd81d1ea3c9a743f Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Sat, 3 Apr 2010 03:01:36 +0100 Subject: [PATCH] Corp updates are included in the characters, so seperate corp update is optional --- eve_api/cron.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/eve_api/cron.py b/eve_api/cron.py index fa856c3..26f70dc 100644 --- a/eve_api/cron.py +++ b/eve_api/cron.py @@ -9,6 +9,8 @@ class UpdateAPIs(): Updates all Eve API elements in the database """ + settings = { 'update_corp': False } + @property def _logger(self): if not hasattr(self, '__logger'): @@ -30,9 +32,10 @@ class UpdateAPIs(): acc.save() - for corp in EVEPlayerCorporation.objects.all(): - try: - corp.query_and_update_corp() - except: - self._logger.error('Error updating %s' % corp) - continue + if self.settings['update_corp']: + for corp in EVEPlayerCorporation.objects.all(): + try: + corp.query_and_update_corp() + except: + self._logger.error('Error updating %s' % corp) + continue