* Async chalice.core.tenants:tenants_exists, and propagate * rework after review * typofix * fix(chalice): small fixes * fix(api): use a global variable to store singletong... ... that will not work if several POSIX threads are serving from the same POSIX processus. * fix(api): pass database argument as dictionary. ref: https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING * chore(api): ease debugging with simple return statement. * NOTES++ --------- Co-authored-by: Taha Yassine Kraiem <tahayk2@gmail.com>
20 lines
250 B
Python
20 lines
250 B
Python
from collections import namedtuple
|
|
|
|
Application = namedtuple(
|
|
"Application",
|
|
(
|
|
"database",
|
|
),
|
|
)
|
|
|
|
|
|
APPLICATION = None
|
|
|
|
|
|
def set(application):
|
|
global APPLICATION
|
|
APPLICATION = application
|
|
|
|
|
|
def get():
|
|
return APPLICATION
|