MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / app_owner_run

Function app_owner_run

tests/test_daemon_application.c:6749–6760  ·  view source on GitHub ↗

An unnamed async start, then unnamed status polls naming the same * repo_path: one while the held worker runs, one after it drained. */

Source from the content-addressed store, hash-verified

6747/* An unnamed async start, then unnamed status polls naming the same
6748 * repo_path: one while the held worker runs, one after it drained. */
6749static void app_owner_run(app_owner_fixture_t *owner, app_owner_run_t *run) {
6750 memset(run, 0, sizeof(*run));
6751 app_async_fixture_t *fixture = &owner->fixture;
6752 run->started = app_async_call_now(fixture, owner->session, ",\"async\":true");
6753 run->worker_running = run->started && !app_async_contains(run->started, "\"isError\":true") &&
6754 app_wait_for_atomic_int(&fixture->fake.starts, 1);
6755 run->running = app_async_call_now(fixture, owner->session, ",\"status\":true");
6756 atomic_store(&fixture->fake.allow_completion, true);
6757 run->drained = run->worker_running && app_wait_for_active_jobs(fixture->application, 0);
6758 run->finished =
6759 run->drained ? app_async_call_now(fixture, owner->session, ",\"status\":true") : NULL;
6760}
6761
6762static void app_owner_run_free(app_owner_run_t *run) {
6763 free(run->started);

Callers 1

Calls 4

app_async_call_nowFunction · 0.85
app_async_containsFunction · 0.85
app_wait_for_atomic_intFunction · 0.85
app_wait_for_active_jobsFunction · 0.85

Tested by

no test coverage detected