osmose.cleanupΒΆ

Temporary directory management for osmose-python.

osmose_* temp directories are created during runs, calibration, export, and demo loading. Without explicit cleanup they accumulate over time, especially during calibration with hundreds of runs. This module provides:

  • cleanup_old_temp_dirs() β€” removes osmose temp dirs older than a given age

  • register_cleanup() β€” registers an atexit handler that cleans on exit

Functions

cleanup_old_temp_dirs([max_age_hours])

Remove osmose temp directories older than max_age_hours.

register_cleanup()

Register an atexit handler that removes all osmose temp dirs on shutdown.