- Fixes #2488 - Adds a k8s api call to set `suspend=false` on Job when associated CrawlJob is finished. - bump version - released as 1.14.5
This commit is contained in:
parent
d2601a037e
commit
eb300815a7
@ -280,6 +280,18 @@ class K8sAPI:
|
||||
traceback.print_exc()
|
||||
return {"error": str(exc)}
|
||||
|
||||
async def unsuspend_k8s_job(self, name) -> dict:
|
||||
"""unsuspend k8s Job"""
|
||||
try:
|
||||
await self.batch_api.patch_namespaced_job(
|
||||
name=name, namespace=self.namespace, body={"spec": {"suspend": False}}
|
||||
)
|
||||
return {"success": True}
|
||||
# pylint: disable=broad-except
|
||||
except Exception as exc:
|
||||
traceback.print_exc()
|
||||
return {"error": str(exc)}
|
||||
|
||||
async def print_pod_logs(self, pod_names, lines=100):
|
||||
"""print pod logs"""
|
||||
for pod in pod_names:
|
||||
|
@ -42,6 +42,8 @@ class CronJobOperator(BaseOperator):
|
||||
"completionTime": finished,
|
||||
}
|
||||
|
||||
self.run_task(self.k8s.unsuspend_k8s_job(metadata.get("name")))
|
||||
|
||||
return MCDecoratorSyncResponse(
|
||||
attachments=[],
|
||||
# set on job to match default behavior when job finishes
|
||||
|
@ -1,3 +1,3 @@
|
||||
"""current version"""
|
||||
|
||||
__version__ = "1.14.4"
|
||||
__version__ = "1.14.5"
|
||||
|
@ -5,7 +5,7 @@ type: application
|
||||
icon: https://webrecorder.net/assets/icon.png
|
||||
|
||||
# Browsertrix and Chart Version
|
||||
version: v1.14.4
|
||||
version: v1.14.5
|
||||
|
||||
dependencies:
|
||||
- name: btrix-admin-logging
|
||||
|
@ -103,7 +103,7 @@ replica_deletion_delay_days: 0
|
||||
|
||||
# API Image
|
||||
# =========================================
|
||||
backend_image: "docker.io/webrecorder/browsertrix-backend:1.14.4"
|
||||
backend_image: "docker.io/webrecorder/browsertrix-backend:1.14.5"
|
||||
backend_pull_policy: "Always"
|
||||
|
||||
backend_password_secret: "PASSWORD!"
|
||||
@ -161,7 +161,7 @@ backend_avg_memory_threshold: 95
|
||||
|
||||
# Nginx Image
|
||||
# =========================================
|
||||
frontend_image: "docker.io/webrecorder/browsertrix-frontend:1.14.4"
|
||||
frontend_image: "docker.io/webrecorder/browsertrix-frontend:1.14.5"
|
||||
frontend_pull_policy: "Always"
|
||||
|
||||
frontend_cpu: "10m"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "browsertrix-frontend",
|
||||
"version": "1.14.4",
|
||||
"version": "1.14.5",
|
||||
"main": "index.ts",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
|
@ -1 +1 @@
|
||||
1.14.4
|
||||
1.14.5
|
||||
|
Loading…
Reference in New Issue
Block a user