Compare commits
2 Commits
9741669487
...
5708cb1ea9
Author | SHA1 | Date |
---|---|---|
Emmanuel Garette | 5708cb1ea9 | |
Emmanuel Garette | 664a2404fa |
13
README.md
13
README.md
|
@ -36,12 +36,19 @@ Chacun de ces services documente la structure de la table mais ne se charge pas
|
|||
La création de la table, selon le schéma fournit dans la documentation, est à la charge de l’administrateur du système.
|
||||
|
||||
# Empty database:
|
||||
su - postgres
|
||||
psql -U postgres risotto
|
||||
drop table log; drop table userrole; drop table release; drop table source; drop table server; drop table servermodel; drop table applicationservice; drop table roleuri; drop table risottouser; drop table uri;
|
||||
|
||||
````
|
||||
psql -U postgres
|
||||
drop database risotto;
|
||||
drop user risotto;
|
||||
\q
|
||||
reconfigure
|
||||
```
|
||||
|
||||
```
|
||||
psql -U postgres tiramisu
|
||||
drop table value; drop table property; drop table permissive; drop table information; drop table session;
|
||||
```
|
||||
|
||||
# Import EOLE
|
||||
./script/cucchiaiata source.create -n eole -u http://localhost
|
||||
|
|
|
@ -3,7 +3,7 @@ from os import environ
|
|||
|
||||
CONFIGURATION_DIR = environ.get('CONFIGURATION_DIR', '/srv/risotto/configurations')
|
||||
PROVIDER_FACTORY_CONFIG_DIR = environ.get('PROVIDER_FACTORY_CONFIG_DIR', '/srv/factory')
|
||||
TMP_DIR = 'tmp'
|
||||
TMP_DIR = '/tmp'
|
||||
DEFAULT_USER = environ.get('DEFAULT_USER', 'Anonymous')
|
||||
RISOTTO_DB_NAME = environ.get('RISOTTO_DB_NAME', 'risotto')
|
||||
RISOTTO_DB_PASSWORD = environ.get('RISOTTO_DB_PASSWORD', 'risotto')
|
||||
|
|
|
@ -147,40 +147,39 @@ class PublishDispatcher:
|
|||
check_role,
|
||||
kwargs,
|
||||
function_objs)
|
||||
else:
|
||||
try:
|
||||
async with self.pool.acquire() as connection:
|
||||
await connection.set_type_codec(
|
||||
'json',
|
||||
encoder=dumps,
|
||||
decoder=loads,
|
||||
schema='pg_catalog'
|
||||
)
|
||||
risotto_context.connection = connection
|
||||
async with connection.transaction():
|
||||
return await self.launch(version,
|
||||
message,
|
||||
risotto_context,
|
||||
check_role,
|
||||
kwargs,
|
||||
function_objs)
|
||||
except CallError as err:
|
||||
raise err
|
||||
except Exception as err:
|
||||
# if there is a problem with arguments, just send an error and do nothing
|
||||
if get_config()['global']['debug']:
|
||||
print_exc()
|
||||
async with self.pool.acquire() as connection:
|
||||
await connection.set_type_codec(
|
||||
'json',
|
||||
encoder=dumps,
|
||||
decoder=loads,
|
||||
schema='pg_catalog'
|
||||
)
|
||||
risotto_context.connection = connection
|
||||
async with connection.transaction():
|
||||
await log.error_msg(risotto_context, kwargs, err)
|
||||
raise err
|
||||
try:
|
||||
async with self.pool.acquire() as connection:
|
||||
await connection.set_type_codec(
|
||||
'json',
|
||||
encoder=dumps,
|
||||
decoder=loads,
|
||||
schema='pg_catalog'
|
||||
)
|
||||
risotto_context.connection = connection
|
||||
async with connection.transaction():
|
||||
return await self.launch(version,
|
||||
message,
|
||||
risotto_context,
|
||||
check_role,
|
||||
kwargs,
|
||||
function_objs)
|
||||
except CallError as err:
|
||||
raise err
|
||||
except Exception as err:
|
||||
# if there is a problem with arguments, just send an error and do nothing
|
||||
if get_config()['global']['debug']:
|
||||
print_exc()
|
||||
async with self.pool.acquire() as connection:
|
||||
await connection.set_type_codec(
|
||||
'json',
|
||||
encoder=dumps,
|
||||
decoder=loads,
|
||||
schema='pg_catalog'
|
||||
)
|
||||
risotto_context.connection = connection
|
||||
async with connection.transaction():
|
||||
await log.error_msg(risotto_context, kwargs, err)
|
||||
raise err
|
||||
|
||||
|
||||
class Dispatcher(register.RegisterDispatcher,
|
||||
|
@ -329,8 +328,6 @@ class Dispatcher(register.RegisterDispatcher,
|
|||
if key in function_obj['arguments']:
|
||||
kw[key] = value
|
||||
|
||||
|
||||
|
||||
kw['risotto_context'] = risotto_context
|
||||
returns = await function(self.injected_self[function_obj['module']], **kw)
|
||||
if risotto_context.type == 'rpc':
|
||||
|
|
Loading…
Reference in New Issue