mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 05:37:20 +08:00
Co-authored-by: openhands <openhands@all-hands.dev> Co-authored-by: OpenHands Bot <contact@all-hands.dev>
23 lines
555 B
Python
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())
|