import os
import pymongo

UNZIP_FOLDER = os.path.join(os.path.dirname(__file__),"unzip")
UPLOAD_FOLDER = os.path.join(os.path.dirname(__file__), "run_uploads")
OUTPUT_FOLDER = os.path.join(os.path.dirname(__file__), "output")
STATIC_FOLDER = os.path.join(os.path.dirname(__file__), "static")

num_workers = 12
environment_var = "DEV"
# environment_var = "PROD"


def get_db():
    # get database
    if environment_var == "DEV":
        client = pymongo.MongoClient("mongodb://localhost:27017/SiteContext")
        db = client.SiteContext
    else:
        client = pymongo.MongoClient(
            "mongodb://"
        )
        db = client.sitecontext_db
    return db
