Flows and dashboards are created by POST under an issued or superuser-pinned id; PUT only updates; deleted flows leave a tombstone with their key; the controller stores by id and runs by key, hooks live under /hooks/<flow id>; a key with state or queued work behind it is refused until cleared
This commit is contained in:
@@ -60,6 +60,7 @@ from fluksio.flow.runs import RUN_STATE_TTL, RunService, sweep_artifacts
|
||||
from fluksio.flow.secrets import init_secrets
|
||||
from fluksio.flow.state import MemoryState, RedisState, StateBackend
|
||||
from fluksio.flow.store import FlowStore, IdentityChange, InvalidName
|
||||
from fluksio.flow.tombstones import Tombstones
|
||||
from fluksio.flow.watchdog import LoopWatchdog
|
||||
from fluksio.flow.workers import PythonWorkerPool
|
||||
|
||||
@@ -69,7 +70,7 @@ logger = logging.getLogger(__name__)
|
||||
#: worker's `?token=`, the pairing poll's `?secret=`.
|
||||
_CREDENTIAL_IN_QUERY = re.compile(r"([?&](?:[\w-]*token|[\w-]*secret|ticket)=)[^&\s]+")
|
||||
|
||||
#: A hook's secret, the last segment of `/hooks/<flow>/<path>/<secret>`. A hook
|
||||
#: A hook's secret, the last segment of `/hooks/<flow id>/<path>/<secret>`. A hook
|
||||
#: without one loses its last path segment from the log too, since the log
|
||||
#: cannot tell which hooks carry a secret.
|
||||
_SECRET_IN_HOOK_PATH = re.compile(r"(/hooks/[^/\s?]+/(?:[^/\s?]*/)*)[^/\s?]+")
|
||||
@@ -306,7 +307,7 @@ async def lifespan(app: FastAPI) -> AsyncIterator[None]:
|
||||
# store's own `_migrate`, the device migrations below and every cache
|
||||
# after them write documents back with whatever id they read.
|
||||
await run_in_threadpool(assign_ids, settings.FLOWS_DIR)
|
||||
store = FlowStore(settings.FLOWS_DIR)
|
||||
store = FlowStore(settings.FLOWS_DIR, tombstones=Tombstones())
|
||||
# The packages node code imports. In the background, because a first
|
||||
# install of anything substantial takes minutes and `uv` is given five
|
||||
# of them twice over — held here, the container never answers its
|
||||
|
||||
Reference in New Issue
Block a user