mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
Migrated the final cronjobs over to tasks
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
import logging
|
||||
import datetime
|
||||
|
||||
from eve_api.models.api_player import EVEAccount, EVEPlayerCorporation, EVEPlayerCharacter
|
||||
import eve_api.api_puller.accounts
|
||||
from eve_api.api_puller.alliances import __start_full_import as alliance_import
|
||||
from eve_api.api_puller.corp_management import pull_corp_members
|
||||
from eve_api.api_exceptions import APIAuthException, APINoUserIDException
|
||||
from eve_api.app_defines import *
|
||||
|
||||
from eve_api.tasks import *
|
||||
|
||||
class AllianceUpdate():
|
||||
"""
|
||||
Pulls the AllianceList.xml.aspx and updates the alliance objects
|
||||
"""
|
||||
|
||||
@property
|
||||
def _logger(self):
|
||||
if not hasattr(self, '__logger'):
|
||||
self.__logger = logging.getLogger(__name__)
|
||||
return self.__logger
|
||||
|
||||
def job(self, args):
|
||||
alliance_import()
|
||||
@@ -60,6 +60,12 @@ def import_apikey(api_userid, api_key, user=None, force_cache=False):
|
||||
return acc
|
||||
|
||||
|
||||
@task(ignore_result=True, rate_limit='10/d')
|
||||
def import_alliance_details():
|
||||
from eve_api.api_puller.alliances import __start_full_import as alliance_import
|
||||
alliance_import()
|
||||
|
||||
|
||||
@task(ignore_result=True, rate_limit='5/m')
|
||||
def import_corp_members(api_userid, api_key, character_id):
|
||||
pull_corp_members(api_key, api_userid, character_id)
|
||||
|
||||
Reference in New Issue
Block a user