Commit 613902c6 authored by Julian Rother's avatar Julian Rother
Browse files

Added stub background thread for db cleanup

parent 99ac1463
...@@ -3,10 +3,21 @@ from flask import Flask, g, request, url_for, redirect, session, render_template ...@@ -3,10 +3,21 @@ from flask import Flask, g, request, url_for, redirect, session, render_template
from werkzeug.routing import Rule from werkzeug.routing import Rule
from functools import wraps from functools import wraps
from datetime import date, timedelta, datetime, time from datetime import date, timedelta, datetime, time
import threading
import os import os
app = Flask(__name__) app = Flask(__name__)
def timer_func():
with app.test_request_context():
pass # do something
timer = threading.Timer(60*60, timer_func)
timer.start()
timer = threading.Timer(0, timer_func)
timer.daemon = True
timer.start()
config = app.config config = app.config
config['DB_SCHEMA'] = 'db_schema.sql' config['DB_SCHEMA'] = 'db_schema.sql'
config['DB_DATA'] = 'db_example.sql' config['DB_DATA'] = 'db_example.sql'
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment