Save JSON in DB

This commit is contained in:
2024-09-22 11:42:20 +02:00
parent 2be1191a03
commit f914ca6597
6 changed files with 149 additions and 14 deletions

View File

@ -20,7 +20,7 @@ class Command(BaseCommand):
*args: Variable length argument list.
**kwargs: Arbitrary keyword arguments.
"""
dir_name = Path("json")
dir_name = Path("json2")
for num, file in enumerate(Path(dir_name).rglob("*.json")):
logger.info("Processing %s", file)

View File

@ -255,7 +255,7 @@ class Command(BaseCommand):
await browser.close()
for num, campaign in enumerate(json_data, start=1):
await process_json_data(num=num, campaign=campaign, local=True)
await process_json_data(num=num, campaign=campaign, local=False)
return json_data