Skip to content

feat(compose): PLTF-3689 clean up stale conversation start tasks - #879

Merged
aivong-openhands merged 2 commits into
mainfrom
pltf-3689-compose-app-conversation-start-task-clean
Oct 20, 2026
Merged

aivong-openhands merged 2 commits into
mainfrom
pltf-3689-compose-app-conversation-start-task-clean

Conversation

@aivong-openhands

@aivong-openhands aivong-openhands commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

HUMAN:

  • A human has tested these changes.

AGENT:


Why

Docker Compose installs have no Kubernetes CronJobs, so nothing deletes old app_conversation_start_task rows there and the table grows without limit. #874 made that cleanup a worker task that stays off until enabled. This PR turns it on for the Compose worker, which now deletes rows older than a day, daily at 03:00 UTC. Kubernetes installs don't read this file, so their CronJob stays the only thing that runs the cleanup there.

Summary

  • Set OH_WORKER_SCHEDULED_JOBS_APP_CONVERSATION_START_TASK_CLEAN=true on the Compose worker service.

Issue Number

None.

How to Test

  • docker compose up --build: the worker started on the default and scheduled_jobs queues and registered scheduled_jobs:app_conversation_start_task_clean at 0 3 * * *.
  • Job run on that stack: I seeded one start-task row created 2 days ago and one created now, then queued the job. The running worker deleted the old row, kept the new one, and the job finished succeeded.

Video/Screenshots

N/A. No UI change.

Type

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

Notes

None.

This PR was drafted by an AI agent on behalf of the user.

@aivong-openhands can click here to continue refining the PR


Enterprise server image for this PR:

ghcr.io/openhands/enterprise-server:sha-985b756

…the worker

Co-authored-by: openhands <openhands@all-hands.dev>
@github-actions github-actions Bot added the type: feat A new feature label Oct 19, 2026
Co-authored-by: openhands <openhands@all-hands.dev>
@aivong-openhands aivong-openhands changed the title feat(compose): PLTF-3689 enable app_conversation_start_task_clean on the worker feat(compose): PLTF-3689 clean up stale conversation start tasks Oct 19, 2026
@aivong-openhands

Copy link
Copy Markdown
Contributor Author

Validation: Docker Compose stack, scheduled start-task cleanup

Tested 985b756 with a docker compose up --build of this branch: the full stack on one host, with Postgres 16.

Result: pass. The Compose worker registers the start-task cleanup on its daily schedule. When the job runs, it deletes start-task rows older than a day and keeps newer ones.

Setup

  1. Ran docker compose up --build from a clean checkout of 985b756. The app migrated the empty database on startup.
  2. Seeded two app_conversation_start_task rows: one created 2 days ago and one created now.
  3. Queued scheduled_jobs:app_conversation_start_task_clean once from inside the worker container, using the task the worker registers (same queue and lock), instead of waiting for 03:00 UTC.

What I checked

Flag picked up ✅ Starting worker on queues default, scheduled_jobs
Schedule ✅ Registering task scheduled_jobs:app_conversation_start_task_clean with periodic id '' to run periodically with cron 0 3 * * *
Job runs on the worker ✅ job 7 on queue scheduled_jobs with lock scheduled_jobs:app_conversation_start_task_clean: deferred → started → succeeded in 0.7 s
Cleanup ✅ Deleted 1 app_conversation_start_task rows older than 1 day(s). The 2-day-old row is gone and the new row remains

This comment was drafted by an AI agent on behalf of the user.

@aivong-openhands
aivong-openhands marked this pull request as ready for review October 19, 2026 23:01
@github-actions

Copy link
Copy Markdown
Contributor

Coverage report

This PR does not seem to contain any modification to coverable code.

@aivong-openhands
aivong-openhands merged commit 033de5a into main Oct 20, 2026
20 checks passed
@aivong-openhands
aivong-openhands deleted the pltf-3689-compose-app-conversation-start-task-clean branch October 20, 2026 14:22
@openhands-release-bot openhands-release-bot Bot added the released: 1.74.0 Shipped in 1.74.0 label Oct 20, 2026
@openhands-release-bot

Copy link
Copy Markdown
Contributor

🚀 Released in 1.74.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released: 1.74.0 Shipped in 1.74.0 type: feat A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants