osu-wayback/objects/glob.py

17 lines
346 B
Python
Raw Normal View History

2019-03-11 07:06:31 +01:00
import json
2019-03-11 07:51:05 +01:00
import sqlite3
2019-03-11 07:06:31 +01:00
from multiprocessing.pool import ThreadPool
2019-03-11 07:51:05 +01:00
from helpers import databaseHelper
2019-03-11 07:06:31 +01:00
with open("config.json", "r") as f:
config = json.load(f)
2019-03-11 13:54:27 +01:00
routes = []
2019-03-11 07:06:31 +01:00
app = None
sql = None
pool = ThreadPool(config["threads"])
2019-03-11 07:51:05 +01:00
def new_sql():
db = sqlite3.connect("wayback.db")
db.row_factory = databaseHelper.dict_factory
return db