Skip to content

Commit

Permalink
Fix bg job retry
Browse files Browse the repository at this point in the history
  • Loading branch information
tw4l committed Feb 18, 2025
1 parent ed03d12 commit eba787c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions backend/btrixcloud/background_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ async def retry_org_background_job(
job.replica_storage,
primary_file_path,
primary_endpoint,
existing_job_id=job_id,
existing_job_id=job.id,
)
return {"success": True}

Expand All @@ -696,29 +696,29 @@ async def retry_org_background_job(
job.object_type,
job.replica_storage,
force_start_immediately=True,
existing_job_id=job_id,
existing_job_id=job.id,
)
return {"success": True}

if job.type == BgJobType.DELETE_ORG:
await self.create_delete_org_job(
org,
existing_job_id=job_id,
existing_job_id=job.id,
)
return {"success": True}

if job.type == BgJobType.RECALCULATE_ORG_STATS:
await self.create_recalculate_org_stats_job(
org,
existing_job_id=job_id,
existing_job_id=job.id,
)
return {"success": True}

if job.type == BgJobType.READD_ORG_PAGES:
await self.create_re_add_org_pages_job(
org.id,
job.crawl_type,
existing_job_id=job_id,
existing_job_id=job.id,
)
return {"success": True}

Expand Down

0 comments on commit eba787c

Please sign in to comment.