mirror of
https://github.com/dredx/prole.git
synced 2026-09-23 11:03:59 +00:00
- Add build-context helper to copy Docker context safely (ignore runtime data, keep symlinks) - Update UI and core actions to use ~/.prole/build and shared copy helper - Add/adjust tests and scripts; introduce knoe ops helpers and update manifests Co-authored-by: Junie <junie@jetbrains.com>
16 lines
379 B
Python
16 lines
379 B
Python
from __future__ import annotations
|
|
|
|
import time
|
|
from typing import Callable
|
|
|
|
|
|
def wait_for(predicate: Callable[[], bool], *, timeout_s: float = 60.0, poll_s: float = 1.0) -> bool:
|
|
"""Minimal shared readiness helper."""
|
|
|
|
end = time.time() + timeout_s
|
|
while time.time() < end:
|
|
if predicate():
|
|
return True
|
|
time.sleep(poll_s)
|
|
return False
|