Fix bridging and refactor
This commit is contained in:
18
core/management/commands/ur.py
Normal file
18
core/management/commands/ur.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from core.util import logs
|
||||
from django.core.management.base import BaseCommand
|
||||
from django.conf import settings
|
||||
from core.modules.router import UnifiedRouter
|
||||
import asyncio
|
||||
|
||||
log = logs.get_logger("UR")
|
||||
|
||||
class Command(BaseCommand):
|
||||
def handle(self, *args, **options):
|
||||
loop = asyncio.new_event_loop()
|
||||
asyncio.set_event_loop(loop)
|
||||
|
||||
instance = UnifiedRouter(loop)
|
||||
|
||||
instance.start()
|
||||
|
||||
instance.run()
|
||||
Reference in New Issue
Block a user