mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
Split API import tasks into two seperate jobs, one for the frontend, one for backend
This commit is contained in:
@@ -30,8 +30,14 @@ def queue_apikey_updates(update_delay=86400, batch_size=50):
|
||||
|
||||
@task(ignore_result=True)
|
||||
def import_apikey(api_userid, api_key, user=None, force_cache=False):
|
||||
import_apikey_func(api_userid, api_key, user, force_cache):
|
||||
|
||||
log = import_apikey.get_logger('import_apikey')
|
||||
@task()
|
||||
def import_apikey_result(api_userid, api_key, user=None, force_cache=False):
|
||||
return import_apikey_func(api_userid, api_key, user, force_cache)
|
||||
|
||||
def import_apikey_func(api_userid, api_key, user=None, force_cache=False):
|
||||
log = import_apikey.get_logger('import_apikey_result')
|
||||
log.info('Importing %s/%s' % (api_userid, api_key))
|
||||
acc = import_eve_account(api_key, api_userid, force_cache=force_cache)
|
||||
log.debug('Completed')
|
||||
@@ -59,6 +65,8 @@ def import_apikey(api_userid, api_key, user=None, force_cache=False):
|
||||
if acc.user:
|
||||
update_user_access.delay(user=acc.user.id)
|
||||
|
||||
return acc
|
||||
|
||||
|
||||
@task(ignore_result=True)
|
||||
def import_alliance_details():
|
||||
|
||||
Reference in New Issue
Block a user