46 lines
1.0 KiB
Python
46 lines
1.0 KiB
Python
import threading
|
|
import logging
|
|
import os
|
|
|
|
from core.server.server import startServer
|
|
from core.execution.createthread import buildThread
|
|
from plugins.rmass.monitors import rmassmonitor
|
|
#from plugins.rmass.actions import refresh_tokens
|
|
from plugins.rmass.operations import token_update
|
|
|
|
from core.console import console
|
|
from rich.logging import RichHandler
|
|
|
|
logging.basicConfig(
|
|
level=os.environ.get("LOG_LEVEL", "WARNING").upper(),
|
|
format="%(message)s",
|
|
handlers=[
|
|
RichHandler(
|
|
console=console,
|
|
show_time=False,
|
|
show_path=False
|
|
)
|
|
|
|
],
|
|
force=True
|
|
)
|
|
|
|
import login
|
|
import synapsemessagepush
|
|
|
|
rmassmonitor.mode = "continuous"
|
|
token_update.mode = "continuous"
|
|
#refresh_tokens.mode = "continuous"
|
|
|
|
thread = buildThread(rmassmonitor)
|
|
|
|
#thread = buildThread(refresh_tokens)
|
|
|
|
thread = buildThread(token_update)
|
|
|
|
thread = threading.Thread(
|
|
target=startServer,
|
|
#args=(module, lifecycles)
|
|
name="RMASS Bridge Server"
|
|
)
|
|
thread.start() |