1 from flask_script import Command 2 from coprs import db_session_scope 3 from coprs.logic.coprs_logic import CoprsLogic 4 5 6 -class CleanExpiredProjectsCommand(Command): 7 """ 8 Clean all the expired temporary projects. This command is meant to be 9 executed by cron. 10 """ 11 12 # pylint: disable=method-hidden 13 - def run(self): 14 with db_session_scope(): 15 CoprsLogic.delete_expired_projects() 16