refactor: remove GitHub webhook support
This commit is contained in:
@@ -9,7 +9,6 @@ from pyrogram import Client, idle
|
||||
from app.agentic import AgentSessionStore
|
||||
from app.commands import DEFAULT_REGISTRY, CommandRegistry, RuntimeAclStore
|
||||
from app.config import AccountConfig, AppConfig
|
||||
from app.github_webhook import GitHubWebhookServer
|
||||
from app.handlers import register_common_handlers
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@@ -31,12 +30,10 @@ class AccountManager:
|
||||
config: AppConfig
|
||||
command_registry: CommandRegistry = field(init=False)
|
||||
states: list[AccountState] = field(init=False)
|
||||
github_webhook_server: GitHubWebhookServer = field(init=False)
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
self.command_registry = DEFAULT_REGISTRY
|
||||
self.states = [AccountState(config=account) for account in self.config.accounts]
|
||||
self.github_webhook_server = GitHubWebhookServer(self, self.config.github_webhook)
|
||||
|
||||
def _make_client(self, account: AccountConfig) -> Client:
|
||||
api_id = account.api_id if account.api_id is not None else self.config.api_id
|
||||
@@ -146,8 +143,6 @@ class AccountManager:
|
||||
raise RuntimeError("No accounts were started successfully")
|
||||
|
||||
try:
|
||||
await self.github_webhook_server.start()
|
||||
await idle()
|
||||
finally:
|
||||
await self.github_webhook_server.stop()
|
||||
await self.stop_all()
|
||||
|
||||
Reference in New Issue
Block a user