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(args) None[source]

Main entry function.

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

Cleans the discard folder if it is older than the retention time, starting from oldest first.

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]
cleaner.terminate_process(signalNumber, frame) None[source]

Triggers the shutdown of the service.