コード例 #1
0
    def ready(self):
        """Configure kuma.core after models are loaded."""

        # Clean up expired sessions every 60 minutes
        from kuma.core.tasks import clean_sessions

        app.add_periodic_task(60 * 60, clean_sessions.s())
コード例 #2
0
    def add_periodc_tasks(self):
        # Clean up expired sessions every 60 minutes
        from kuma.core.tasks import clean_sessions

        app.add_periodic_task(60 * 60, clean_sessions.s())