This repository was archived by the owner on May 27, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ async def setup_indexing_pipeline(
127127 )
128128 # if indexing job is in a failed state, delete the associated K8s job and pod to allow for a new job to be scheduled
129129 if PipelineJobState (existing_job .status ) == PipelineJobState .FAILED :
130- _delete_k8s_job (f"indexing-job-{ sanitized_index_name } " , "graphrag" )
130+ _delete_k8s_job (f"indexing-job-{ sanitized_index_name } " , os . environ [ "AKS_NAMESPACE" ] )
131131 # reset the pipeline job details
132132 existing_job ._status = PipelineJobState .SCHEDULED
133133 existing_job ._percent_complete = 0
Original file line number Diff line number Diff line change @@ -68,11 +68,11 @@ async def lifespan(app: FastAPI):
6868 ] = pod .spec .service_account_name
6969 # retrieve list of existing cronjobs
7070 batch_v1 = client .BatchV1Api ()
71- namespace_cronjobs = batch_v1 .list_namespaced_cron_job (namespace = "graphrag" )
71+ namespace_cronjobs = batch_v1 .list_namespaced_cron_job (namespace = os . environ [ "AKS_NAMESPACE" ] )
7272 cronjob_names = [cronjob .metadata .name for cronjob in namespace_cronjobs .items ]
7373 # create cronjob if it does not exist
7474 if manifest ["metadata" ]["name" ] not in cronjob_names :
75- batch_v1 .create_namespaced_cron_job (namespace = "graphrag" , body = manifest )
75+ batch_v1 .create_namespaced_cron_job (namespace = os . environ [ "AKS_NAMESPACE" ] , body = manifest )
7676 except Exception as e :
7777 print ("Failed to create graphrag cronjob." )
7878 reporter = ReporterSingleton ().get_instance ()
You can’t perform that action at this time.
0 commit comments