Added TODOs

This commit is contained in:
Dominik V. Salonen 2016-01-18 10:33:47 +01:00
parent 40e67556fe
commit 564adde040
3 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,8 @@
import sqlite3 import sqlite3
import time import time
# TODO: (Hopefully) add support for DB types other than SQLite
def connect(target): def connect(target):
return sqlite3.connect(target) return sqlite3.connect(target)

View File

@ -1,6 +1,7 @@
from datetime import datetime from datetime import datetime
import time import time
# TODO: I dunno, but there's gotta be a better way to do this crap
def print_log(source, message): def print_log(source, message):
if source == "Main": if source == "Main":
print('\033[92m' + source + ': \033[0m' + message) print('\033[92m' + source + ': \033[0m' + message)

4
run.py
View File

@ -19,7 +19,7 @@ from Hyozan.output import print_log, time_to_string
app = Flask(__name__) app = Flask(__name__)
# Pre-start functions # TODO: Try to turn these into functions or something I dunno
print_log('Main', 'Running in "' + os.getcwd() + '"') print_log('Main', 'Running in "' + os.getcwd() + '"')
print_log('Main', 'Checking for data folder') print_log('Main', 'Checking for data folder')
if not os.path.exists(config['UPLOAD_FOLDER']): if not os.path.exists(config['UPLOAD_FOLDER']):
@ -30,7 +30,7 @@ log.setLevel(logging.ERROR)
def cleaner_thread(): def cleaner_thread():
# This is horrid # TODO: Make this into a less shitty timer
while True: while True:
print_log('Notice', 'Cleaner started') print_log('Notice', 'Cleaner started')
delete_old() delete_old()