Compare commits
No commits in common. "9423cdef8d2b1983c85d6b010bd3d3c2d0f4becc" and "fc5a13152bc195d2d50f54965acfa9a60b09ddfa" have entirely different histories.
9423cdef8d
...
fc5a13152b
|
@ -65,18 +65,6 @@ if 'CELERYRISOTTO_DB_USER' in environ:
|
|||
CELERYRISOTTO_DB_USER = environ['CELERYRISOTTO_DB_USER']
|
||||
else:
|
||||
CELERYRISOTTO_DB_USER = config.get('CELERYRISOTTO_DB_USER', None)
|
||||
if 'LEMUR_DB_NAME' in environ:
|
||||
LEMUR_DB_NAME = environ['LEMUR_DB_NAME']
|
||||
else:
|
||||
LEMUR_DB_NAME = config.get('LEMUR_DB_NAME', None)
|
||||
if 'LEMUR_DB_PASSWORD' in environ:
|
||||
LEMUR_DB_PASSWORD = environ['LEMUR_DB_PASSWORD']
|
||||
else:
|
||||
LEMUR_DB_PASSWORD = config.get('LEMUR_DB_PASSWORD', None)
|
||||
if 'LEMUR_DB_USER' in environ:
|
||||
LEMUR_DB_USER = environ['LEMUR_DB_USER']
|
||||
else:
|
||||
LEMUR_DB_USER = config.get('LEMUR_DB_USER', None)
|
||||
if 'DB_ADDRESS' in environ:
|
||||
DB_ADDRESS = environ['DB_ADDRESS']
|
||||
else:
|
||||
|
@ -153,8 +141,7 @@ def dsn_factory(database, user, password, address=DB_ADDRESS):
|
|||
|
||||
_config = {'database': {'dsn': dsn_factory(RISOTTO_DB_NAME, RISOTTO_DB_USER, RISOTTO_DB_PASSWORD),
|
||||
'tiramisu_dsn': dsn_factory(TIRAMISU_DB_NAME, TIRAMISU_DB_USER, TIRAMISU_DB_PASSWORD),
|
||||
'celery_dsn': dsn_factory(CELERYRISOTTO_DB_NAME, CELERYRISOTTO_DB_USER, CELERYRISOTTO_DB_PASSWORD),
|
||||
'lemur_dns': dsn_factory(LEMUR_DB_NAME, LEMUR_DB_USER, LEMUR_DB_PASSWORD),
|
||||
'celery_dsn': dsn_factory(CELERYRISOTTO_DB_NAME, CELERYRISOTTO_DB_USER, CELERYRISOTTO_DB_PASSWORD)
|
||||
},
|
||||
'http_server': {'port': RISOTTO_PORT,
|
||||
'default_user': DEFAULT_USER,
|
||||
|
|
|
@ -475,8 +475,6 @@ class Dispatcher(register.RegisterDispatcher,
|
|||
)
|
||||
# notification
|
||||
if function_obj.get('notification'):
|
||||
if returns is None:
|
||||
raise Exception(_(f'function "{function_obj["full_module_name"]}.{function_obj["function"].__name__}" must returns something for {function_obj["notification"]}!'))
|
||||
notif_version, notif_message = function_obj['notification'].split('.', 1)
|
||||
if not isinstance(returns, list):
|
||||
send_returns = [returns]
|
||||
|
|
|
@ -23,13 +23,9 @@ extra_statics = {}
|
|||
|
||||
def create_context(request):
|
||||
risotto_context = Context()
|
||||
if 'username' in dict(request.match_info):
|
||||
username = request.match_info['username']
|
||||
elif 'username' in request.headers:
|
||||
username = request.headers['username']
|
||||
else:
|
||||
username = get_config()['http_server']['default_user']
|
||||
risotto_context.username = username
|
||||
risotto_context.username = request.match_info.get('username',
|
||||
get_config()['http_server']['default_user'],
|
||||
)
|
||||
return risotto_context
|
||||
|
||||
|
||||
|
|
|
@ -192,7 +192,7 @@ class Logger:
|
|||
await connection.execute(sql,
|
||||
risotto_context.start_id,
|
||||
datetime.now(),
|
||||
err[:254],
|
||||
err,
|
||||
LEVELS.index('Failure'),
|
||||
)
|
||||
|
||||
|
|
|
@ -107,7 +107,6 @@ class RegisterDispatcher:
|
|||
version = obj['version']
|
||||
if version not in self.messages:
|
||||
self.messages[version] = {}
|
||||
obj['message'] = tiramisu_message
|
||||
self.messages[version][tiramisu_message] = obj
|
||||
|
||||
def get_function_args(self,
|
||||
|
|
Loading…
Reference in New Issue