Compare commits

..

1 Commits

Author SHA1 Message Date
f88bcef5c0 do not stop daemon when on_join failed 2021-04-16 09:33:25 +02:00
5 changed files with 15 additions and 15 deletions

5
debian/changelog vendored Normal file
View File

@ -0,0 +1,5 @@
risotto (0.1) unstable; urgency=low
* first version
-- Cadoles <contact@cadoles.com> Fri, 20 Mar 2020 15:18:25 +0100

14
debian/control vendored
View File

@ -2,23 +2,13 @@ Source: risotto
Section: admin
Priority: extra
Maintainer: Cadoles <contact@cadoles.com>
Build-depends: debhelper (>=11), python3-all, python3-setuptools, dh-python
Build-depends: debhelper (>=11), python3-all, python3-setuptools
Standards-Version: 3.9.4
Homepage: https://forge.cadoles.com/Infra/risotto
Package: python3-risotto
Architecture: any
Pre-Depends: dpkg, python3, ${misc:Pre-Depends}
Depends: ${python:Depends}, ${misc:Depends},
python3-asyncpg,
python3-rougail,
python3-aiohttp,
python3-sdnotify
Description: configuration manager libraries
Package: risotto
Architecture: any
Pre-Depends: dpkg, python3, ${misc:Pre-Depends}
Depends: ${python:Depends}, ${misc:Depends}, python3-risotto
Depends: ${python:Depends}, ${misc:Depends}
Description: configuration manager

View File

@ -1,2 +0,0 @@
script/risotto-server usr/bin/
sql/risotto.sql usr/share/eole/db/eole-risotto/gen/

0
script/risotto-server Executable file → Normal file
View File

View File

@ -7,6 +7,7 @@ from typing import Callable, Optional, List
from asyncpg import create_pool
from json import dumps, loads
from pkg_resources import iter_entry_points
from traceback import print_exc
import risotto
from .utils import _
from .error import RegistrationError
@ -319,7 +320,13 @@ class RegisterDispatcher:
await log.info_msg(risotto_context,
None,
info_msg)
await module.on_join(risotto_context)
try:
await module.on_join(risotto_context)
except Exception as err:
if get_config()['global']['debug']:
print_exc()
msg = _(f'on_join returns an error in module {submodule_name}: {err}')
await log.error_msg(risotto_context, {}, msg)
async def load(self):
# valid function's arguments