Skip to content

Migrate compute service to rqueue - #175

Open
totallynotdavid wants to merge 1 commit into
bumpfrom
cap/picv-asyncpg-rqueue-v2
Open

Migrate compute service to rqueue#175
totallynotdavid wants to merge 1 commit into
bumpfrom
cap/picv-asyncpg-rqueue-v2

Conversation

@totallynotdavid

Copy link
Copy Markdown
Owner

Align queue ownership and database access so cancelled or crashed simulations can be recovered without stale worker writes.

Align queue ownership and database access so cancelled or crashed simulations can be recovered without stale worker writes.
"""Sweep abandoned workspaces until `stop` is set."""
await _run_periodically(
"Sweep of abandoned work directories",
lambda: sweep_abandoned_work_dirs(),
"""Reconcile queue-terminal jobs until `stop` is set."""
await _run_periodically(
"Reconciliation of queue-terminal jobs",
lambda: reconcile_terminal_jobs(),
# holds a live reference to this loop.
task.cancel()
with pytest.raises(asyncio.CancelledError):
await task
await asyncio.to_thread(entered.wait, 5)
task.cancel()
with pytest.raises(asyncio.CancelledError):
await task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants