Skip to content

Commit

Permalink
comments #2
Browse files Browse the repository at this point in the history
  • Loading branch information
azhavoro committed Oct 9, 2024
1 parent d1ac9ef commit 8e6b130
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
4 changes: 4 additions & 0 deletions changelog.d/20241009_164505_andrey_k8s_probes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Added

- \[Helm\] Readiness and liveness probes
(<https://github.com/cvat-ai/cvat/pull/8488>)
Empty file.
13 changes: 8 additions & 5 deletions tests/python/shared/fixtures/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,17 @@ def kube_restore_clickhouse_db():
]
)

def _get_redis_inmem_keys_to_keep():
return ("rq:worker:", "rq:workers", "rq:scheduler_instance:", "rq:queues:")

def docker_restore_redis_inmem():
docker_exec_redis_inmem(
[
"sh",
"-c",
"for p in rq:job:* rq:wip:* rq:finished:* rq:failed:*; "
'do redis-cli -e --scan --pattern "$p" | xargs -r redis-cli -e del ; done',
'redis-cli -e --scan --pattern "*" |'
'grep -v "' + '\|'.join(_get_redis_inmem_keys_to_keep()) + '" |'
'xargs -r redis-cli -e del',
]
)

Expand All @@ -255,9 +258,9 @@ def kube_restore_redis_inmem():
[
"sh",
"-c",
"for p in rq:job:* rq:wip:* rq:finished:* rq:failed:*; "
'do redis-cli -e -a "${REDIS_PASSWORD}" --scan --pattern "$p" | '
'xargs -r redis-cli -e -a "${REDIS_PASSWORD}" del ; done',
'redis-cli -e -a "${REDIS_PASSWORD}" --scan --pattern "*" |'
'grep -v "' + '\|'.join(_get_redis_inmem_keys_to_keep()) + '" |'
'xargs -r redis-cli -e -a "${REDIS_PASSWORD}" del',
]
)

Expand Down

0 comments on commit 8e6b130

Please sign in to comment.