mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Removed django_cron dependancy, use manual started cronjobs
This commit is contained in:
@@ -1,18 +1,14 @@
|
||||
import logging
|
||||
|
||||
from django_cron import cronScheduler, Job
|
||||
from eve_api.models.api_player import EVEAccount, EVEPlayerCorporation
|
||||
import eve_api.api_puller.accounts
|
||||
from eve_api.api_exceptions import APIAuthException, APINoUserIDException
|
||||
|
||||
class UpdateAPIs(Job):
|
||||
class UpdateAPIs():
|
||||
"""
|
||||
Updates all Eve API elements in the database
|
||||
"""
|
||||
|
||||
# run every 2 hours
|
||||
run_every = 7200
|
||||
|
||||
@property
|
||||
def _logger(self):
|
||||
if not hasattr(self, '__logger'):
|
||||
@@ -36,6 +32,3 @@ class UpdateAPIs(Job):
|
||||
|
||||
for corp in EVEPlayerCorporation.objects.all():
|
||||
corp.query_and_update_corp()
|
||||
|
||||
|
||||
cronScheduler.register(UpdateAPIs)
|
||||
|
||||
Reference in New Issue
Block a user