Service cleaner

The cleaner service of mercure. Responsible for deleting processed data after retention time has passed and if it is offpeak time. Offpeak is the time period when the cleaning has to be done, because cleaning I/O should be kept to minimum when receiving and sending exams.

cleaner.clean() None[source]

Main entry function.

cleaner.clean_dir(folder, retention) None[source]

Cleans items from the given folder that have exceeded the retention time, starting with the oldest items

cleaner.delete_folder(entry) None[source]

Deletes given folder.

cleaner.exit_cleaner(args) None[source]

Stop the asyncio event loop.

cleaner.find_series_uid(work_dir) str[source]

Finds series uid which is always part before the ‘#’-sign in filename.

cleaner.main(args=['-b', 'html', '-d', '_build/doctrees', '.', '_build/html']) None[source]
async cleaner.terminate_process(signalNumber, frame) None[source]

Triggers the shutdown of the service.