update to handle new structure from spectra, no more gobs (#1266)
This commit is contained in:
+1
-29
@@ -24,7 +24,7 @@ from discord.ext import tasks
|
||||
|
||||
# Local Module Imports
|
||||
from . import lux_apis
|
||||
from .autologging import handle_ws_replays, handle_gob_message
|
||||
from .autologging import handle_ws_replays
|
||||
from .health import get_recent_ttl_stats, record_task_run, write_heartbeat
|
||||
from .meta_manager import process_all_players, sync_all_guild_metas
|
||||
from .task_executors import (
|
||||
@@ -501,32 +501,6 @@ async def after_ws_autolog():
|
||||
ws_autolog_task.start()
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# WEBSOCKET GOB LISTENER TASK
|
||||
# ============================================================================
|
||||
|
||||
@tasks.loop(count=1)
|
||||
async def ws_gob_task():
|
||||
"""
|
||||
Single-run task that maintains persistent WebSocket connection to the GOB endpoint.
|
||||
Saves incoming compressed GOB replays to disk for on-demand video generation.
|
||||
"""
|
||||
await lux_apis.ws_gob_listener(handle_gob_message)
|
||||
|
||||
|
||||
@ws_gob_task.before_loop
|
||||
async def before_ws_gob():
|
||||
await get_bot().wait_until_ready()
|
||||
|
||||
|
||||
@ws_gob_task.after_loop
|
||||
async def after_ws_gob():
|
||||
if ws_gob_task.failed():
|
||||
logging.error("[GOB] ws_gob_task died, restarting in 10s...")
|
||||
await asyncio.sleep(10)
|
||||
ws_gob_task.start()
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# SQUADRON POINTS CONTINUOUS UPDATER
|
||||
# ============================================================================
|
||||
@@ -729,7 +703,6 @@ async def start_all_tasks():
|
||||
ttl_alert_task.start()
|
||||
# Phase 2: WebSocket listeners
|
||||
ws_autolog_task.start()
|
||||
ws_gob_task.start()
|
||||
# Phase 3: Heavy DB tasks (background — doesn't block on_ready)
|
||||
asyncio.create_task(_startup_heavy_init())
|
||||
|
||||
@@ -747,7 +720,6 @@ def stop_all_tasks():
|
||||
update_squadrons_db_task.cancel()
|
||||
update_meta_data_task.cancel()
|
||||
ws_autolog_task.cancel()
|
||||
ws_gob_task.cancel()
|
||||
squadron_points_loop_task.cancel()
|
||||
sync_guild_metas_task.cancel()
|
||||
health_heartbeat_task.cancel()
|
||||
|
||||
Reference in New Issue
Block a user