Skip to content

Commit fa564c6

Browse files
docs: drop CLI from non-worker-mode description
In CLI mode the bg-worker functions are no longer exposed, so listing CLI as a "non-worker mode" case is misleading. Non-worker mode now means classic request-per-process (HTTP requests where no worker is configured), which is the only case where require still runs with tolerant lazy-start semantics.
1 parent ed8ac48 commit fa564c6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

background_worker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ const (
276276
// requireModeRuntime: HTTP worker inside frankenphp_handle_request.
277277
// Assert-only: worker must already be running; never lazy-starts.
278278
requireModeRuntime
279-
// requireModeNonWorker: non-worker context (classic request, CLI).
279+
// requireModeNonWorker: non-worker context (classic request-per-process).
280280
// Lazy-starts and tolerates transient boot failures via backoff.
281281
requireModeNonWorker
282282
)

docs/background-workers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Declares a dependency on a background worker. Behavior depends on the caller con
4848

4949
- **In an HTTP worker script, before `frankenphp_handle_request()` (bootstrap)**: lazy-starts the worker (at-most-once) if not already running, blocks until it has called `set_vars()` at least once. Fails fast on boot failure (no exponential-backoff tolerance): if the worker's first boot attempts fail, the exception is thrown right away with the captured details. Use this to declare dependencies up front.
5050
- **In an HTTP worker script, inside `frankenphp_handle_request()` (runtime)**: assert-only. The worker must already be running (declared with `num 1` in Caddyfile or previously required during bootstrap). Never lazy-starts. Throws immediately if the name isn't known. Use this to assert a dependency without starting anything.
51-
- **In non-worker mode (classic request, CLI)**: lazy-starts the worker and waits up to `$timeout`, tolerating transient boot failures via exponential backoff. Same behavior every request.
51+
- **In non-worker mode (classic request-per-process)**: lazy-starts the worker and waits up to `$timeout`, tolerating transient boot failures via exponential backoff. Same behavior every request.
5252

5353
```php
5454
// HTTP worker (bootstrap)

0 commit comments

Comments
 (0)