Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move org deletion to background job with access to backend ops classes #2098

Merged
merged 13 commits into from
Oct 10, 2024
Prev Previous commit
Next Next commit
Merge branch 'main' into issue-1898-bg-jobs-org-methods
tw4l authored Oct 8, 2024
commit df3c414c51ad351be2bad2bd55fc2c49cd2402f2
11 changes: 3 additions & 8 deletions backend/btrixcloud/crawlmanager.py
Original file line number Diff line number Diff line change
@@ -17,18 +17,13 @@
# ============================================================================
DEFAULT_PROXY_ID: str = os.environ.get("DEFAULT_PROXY_ID", "")

DEFAULT_NAMESPACE = os.environ.get("DEFAULT_NAMESPACE", "default")


# ============================================================================
class CrawlManager(K8sAPI):
"""abstract crawl manager"""

def __init__(self):
super().__init__()

self.default_namespace = os.environ.get("DEFAULT_NAMESPACE", "default")

self.loop = asyncio.get_running_loop()

# pylint: disable=too-many-arguments
async def run_profile_browser(
self,
@@ -141,7 +136,7 @@ async def run_delete_org_job(

data = self.templates.env.get_template("background_job.yaml").render(params)

await self.create_from_yaml(data, namespace=self.default_namespace)
await self.create_from_yaml(data, namespace=DEFAULT_NAMESPACE)

return job_id

You are viewing a condensed version of this merge commit. You can view the full changes here.