firebase_website: drop the sysinfo sync to Firestore
The website bot status tab was replaced by the VEGA status page, so nothing reads sysinfo/server anymore. get_db() stays for calendar and bucketlist. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
1b074d4b58
commit
d514601651
3 files changed
+3
-189
No files matched your search
@@ -1,35 +1,18 @@
|
||||
"""firebase_website — Bot → Firestore sync using the Admin SDK.
|
||||
"""firebase_website — Bot → Firestore access using the Admin SDK.
|
||||
|
||||
Requires GOOGLE_APPLICATION_CREDENTIALS env var pointing to a service-account JSON.
|
||||
|
||||
This package is loaded as a Discord extension purely for lifecycle hooks
|
||||
(setup / teardown). It does not register a Cog — it starts a background
|
||||
SysInfoSync task instead.
|
||||
Loaded as a Discord extension only so missing credentials fail at startup.
|
||||
The calendar and bucketlist cogs use get_db().
|
||||
|
||||
Usage from main.py:
|
||||
await bot.load_extension("firebase_website")
|
||||
"""
|
||||
######################################################################
|
||||
import logging
|
||||
|
||||
from discord.ext import commands
|
||||
|
||||
from .config import get_db # noqa: re‑export for calendar, bucketlist, etc.
|
||||
from .sysinfo_sync import SysInfoSync
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
_sync: SysInfoSync | None = None
|
||||
|
||||
|
||||
async def setup(bot: commands.Bot) -> None:
|
||||
global _sync
|
||||
get_db() # fail fast if credentials are missing
|
||||
_sync = SysInfoSync()
|
||||
_sync.start()
|
||||
|
||||
|
||||
async def teardown(bot: commands.Bot) -> None:
|
||||
global _sync
|
||||
if _sync is not None:
|
||||
await _sync.stop()
|
||||
Reference in new issue
Block a user