wo4hFddlmZddlmZddlmZGddeZdS)) MessageSink)db)recurring_checkc6eZdZdZdZeeddZdZdZdZ dS) CheckpointzU Checkpoint imunify360.db periodically to limit unexpected WAL file growing. iQ)checkpoint_periodrc0||_||_d|_dSN)_checkpoint_period_db_task)selfrrs W/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/plugins/checkpoint.py__init__zCheckpoint.__init__ s"3 cK||_|jt|j|j|_dSr )_loop create_taskrr _checkpointr )rloops r create_sinkzCheckpoint.create_sinksN Z++ F 4OD3 4 4T5E F F H H   rcK|jdc}|_||rdS||d{VdSr )r cancelledcancel)rtasks rshutdownzCheckpoint.shutdownsP:tdj <4>>++< F  rc>K|jddS)NzPRAGMA wal_checkpoint(TRUNCATE))r execute_sql)rs rrzCheckpoint._checkpoint s% >?????rN) __name__ __module__ __qualname____doc__ONE_DAYrrrrrrrrrsuG,3    @@@@@rrN)!defence360agent.contracts.pluginsrdefence360agent.model.instancerdefence360agent.utilsrrr$rrr(sy999999------111111@@@@@@@@@@r