|
@@ -1,12 +1,15 @@
|
|
|
-from django_celery_results.models import TaskResult
|
|
|
+import json
|
|
|
+
|
|
|
from celery import shared_task
|
|
|
|
|
|
-from games.utils import skyscrape_console, import_gamelist_file_to_db_for_system
|
|
|
+from games.utils import import_gamelist_file_to_db_for_system, skyscrape_console
|
|
|
+
|
|
|
|
|
|
@shared_task
|
|
|
def update_roms(game_system_slugs: list, full_scan=False):
|
|
|
for game_system_slug in game_system_slugs:
|
|
|
scrape_out, load_out = skyscrape_console(game_system_slug)
|
|
|
- import_dict = import_gamelist_file_to_db_for_system(game_system_slug, full_scan=full_scan)
|
|
|
- return import_dict
|
|
|
-
|
|
|
+ import_dict = import_gamelist_file_to_db_for_system(
|
|
|
+ game_system_slug, full_scan=full_scan
|
|
|
+ )
|
|
|
+ return json.dumps(import_dict)
|