mirror of
https://github.com/bellingcat/auto-archiver-api.git
synced 2026-06-11 13:08:34 +03:00
fastapi-users
This commit is contained in:
@@ -10,7 +10,6 @@ celery = Celery(__name__)
|
||||
celery.conf.broker_url = os.environ.get("CELERY_BROKER_URL", "redis://localhost:6379")
|
||||
celery.conf.result_backend = os.environ.get("CELERY_RESULT_BACKEND", "redis://localhost:6379")
|
||||
|
||||
|
||||
@celery.task(name="create_task")
|
||||
def create_task(task_type):
|
||||
print("DEV MODE")
|
||||
@@ -25,8 +24,8 @@ config.parse(use_cli=False, yaml_config_filename="orchestration.yaml")
|
||||
orchestrator = None
|
||||
|
||||
@celery.task(name="create_archive_task")
|
||||
def create_archive_task(url: str = ""):
|
||||
def create_archive_task(url: str , user_email:str=""):
|
||||
global orchestrator
|
||||
if not orchestrator: orchestrator = ArchivingOrchestrator(config)
|
||||
return orchestrator.feed_item(Metadata().set_url(url)).to_json()
|
||||
return True
|
||||
#TODO: associate user with url (?)
|
||||
|
||||
Reference in New Issue
Block a user