|
|
|
@ -18,6 +18,9 @@
|
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
|
|
import asyncio
|
|
|
|
|
import sys
|
|
|
|
|
from rich.console import Console
|
|
|
|
|
|
|
|
|
|
import typer
|
|
|
|
|
from notification_server.server import Server
|
|
|
|
|
|
|
|
|
@ -44,5 +47,10 @@ def up(
|
|
|
|
|
This command [b]start[/] the [yellow b]server[/] which receives notifications and sends to the clients.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
server = Server(ip, port, producer_port)
|
|
|
|
|
asyncio.run(server.up())
|
|
|
|
|
try:
|
|
|
|
|
server = Server(ip, port, producer_port)
|
|
|
|
|
asyncio.run(server.up())
|
|
|
|
|
except KeyboardInterrupt:
|
|
|
|
|
console = Console()
|
|
|
|
|
console.print('[green b][INFO][/] bye[/]')
|
|
|
|
|
sys.exit(0)
|
|
|
|
|