Une API permettant à des manifestants d'enregistrer et de s'inscrire à une manifestation dans le but de s'auto-compter.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

15 lines
442 B

import os
import configparser
import multiprocessing
LOCAL_CONFIG_FILENAME = 'config.local.ini'
if not os.path.exists(LOCAL_CONFIG_FILENAME):
print("\033[91mError: Config file not found: %s\033[0m" % LOCAL_CONFIG_FILENAME)
exit(1)
conf = configparser.ConfigParser()
conf.read(LOCAL_CONFIG_FILENAME)
bind = "%s:%s" % (conf['api']['interface'], conf['api']['port'])
workers = multiprocessing.cpu_count() * 2 + 1
threads = 5
timeout = 120