diff --git a/backend/app/integrations/huntress/routes/provision.py b/backend/app/integrations/huntress/routes/provision.py index c19c2bd7b..e7635cdf0 100644 --- a/backend/app/integrations/huntress/routes/provision.py +++ b/backend/app/integrations/huntress/routes/provision.py @@ -40,9 +40,9 @@ async def provision_huntress_route( await provision_huntress(provision_huntress_request, session) await add_scheduler_jobs( CreateSchedulerRequest( - function_name="invoke_huntress_integration_collection", + function_name="invoke_huntress_integration_collect", time_interval=provision_huntress_request.time_interval, - job_id="invoke_huntress_integration_collection", + job_id="invoke_huntress_integration_collect", ), ) return ProvisionHuntressResponse( diff --git a/backend/app/schedulers/scheduler.py b/backend/app/schedulers/scheduler.py index fc24917b0..5c5561903 100644 --- a/backend/app/schedulers/scheduler.py +++ b/backend/app/schedulers/scheduler.py @@ -264,7 +264,7 @@ def get_function_by_name(function_name: str): "invoke_sap_siem_integration_brute_force_failed_logins": invoke_sap_siem_integration_brute_force_failed_logins, "invoke_sap_siem_integration_brute_force_failed_logins_same_ip": invoke_sap_siem_integration_brute_force_failed_logins_same_ip, "invoke_sap_siem_integration_successful_login_after_multiple_failed_logins": invoke_sap_siem_integration_successful_login_after_multiple_failed_logins, - "invoke_huntress_integration_collection": invoke_huntress_integration_collect, + "invoke_huntress_integration_collect": invoke_huntress_integration_collect, "invoke_duo_integration_collect": invoke_duo_integration_collect, "invoke_darktrace_integration_collect": invoke_darktrace_integration_collect, "invoke_carbonblack_integration_collection": invoke_carbonblack_integration_collect, diff --git a/backend/app/schedulers/services/invoke_huntress.py b/backend/app/schedulers/services/invoke_huntress.py index 9bfa97d90..93b387df7 100644 --- a/backend/app/schedulers/services/invoke_huntress.py +++ b/backend/app/schedulers/services/invoke_huntress.py @@ -34,7 +34,7 @@ async def invoke_huntress_integration_collect() -> InvokeHuntressResponse: InvokeHuntressRequest( customer_code=customer_code, integration_name="Huntress", - time_range=f"{(await get_scheduled_job_metadata('invoke_huntress_integration_collection')).time_interval}m", + time_range=f"{(await get_scheduled_job_metadata('invoke_huntress_integration_collect')).time_interval}m", ), session, ) @@ -42,13 +42,13 @@ async def invoke_huntress_integration_collect() -> InvokeHuntressResponse: await session.close() with get_sync_db_session() as session: # Synchronous ORM operations - job_metadata = session.query(JobMetadata).filter_by(job_id="invoke_huntress_integration_collection").one_or_none() + job_metadata = session.query(JobMetadata).filter_by(job_id="invoke_huntress_integration_collect").one_or_none() if job_metadata: job_metadata.last_success = datetime.utcnow() session.add(job_metadata) session.commit() else: # Handle the case where job_metadata does not exist - print("JobMetadata for 'invoke_huntress_integration_collection' not found.") + print("JobMetadata for 'invoke_huntress_integration_collect' not found.") return InvokeHuntressResponse(success=True, message="Huntress integration invoked.")