Files
OpenHands/enterprise/sync/clean_proactive_convo_table.py
Tim O'Farrell 35bddb14f1 fix: preserve import order in clean_proactive_convo_table.py (#12901)
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: OpenHands Bot <contact@all-hands.dev>
2026-02-17 17:52:54 +00:00

23 lines
555 B
Python

import asyncio # noqa: I001
# This must be before the import of storage
# to set up logging and prevent alembic from
# running its mouth.
from openhands.core.logger import openhands_logger
from storage.proactive_conversation_store import (
ProactiveConversationStore,
)
OLDER_THAN = 30 # 30 minutes
async def main():
openhands_logger.info('clean_proactive_convo_table')
convo_store = ProactiveConversationStore()
await convo_store.clean_old_convos(older_than_minutes=OLDER_THAN)
if __name__ == '__main__':
asyncio.run(main())