chore: переезд на serWebhook

This commit is contained in:
protokey committed 2026-09-26 18:20:35 +04:00
1 parent 45e7a1d22f
commit f1414e5ace
42 files changed
+1391 -224

No files matched your search

+4 -7
View File
@@ -186,7 +186,7 @@ class MyPointInterface(Interface):
domain=draft.get('domain', ''),
outbound_proxy=draft.get('proxy', ''),
)
tasks.install_point.send(point.pk, ctx.chat.pk)
tasks.start(tasks.install_point, point, Point.Status.INSTALLING, ctx.chat)
ctx.reset()
ctx.reply(texts.INSTALL_STARTED, keyboard=texts.MAIN_KEYBOARD_WITH_POINTS)
@@ -243,8 +243,7 @@ class MyPointInterface(Interface):
point = self.idle_point(ctx)
if point is None:
return
point.set_status(Point.Status.RELEASING)
tasks.release_point.send(point.pk, ctx.chat.pk)
tasks.start(tasks.release_point, point, Point.Status.RELEASING, ctx.chat)
ctx.reset()
ctx.reply(texts.RELEASE_STARTED, keyboard=texts.MAIN_KEYBOARD_WITH_POINTS)
@@ -273,8 +272,7 @@ class MyPointInterface(Interface):
self.start_reinstall(ctx, point)
def start_reinstall(self, ctx, point: Point, address: str | None = None, password: str | None = None):
point.set_status(Point.Status.INSTALLING)
tasks.reinstall_point.send(point.pk, ctx.chat.pk, address, password)
tasks.start(tasks.reinstall_point, point, Point.Status.INSTALLING, ctx.chat, address, password)
ctx.reset()
ctx.reply(texts.REINSTALL_STARTED, keyboard=texts.MAIN_KEYBOARD_WITH_POINTS)
@@ -347,8 +345,7 @@ class MyPointInterface(Interface):
self.start_change(ctx, point, tasks.set_outbound_proxy, fields.encrypt(proxy) if proxy else '')
def start_change(self, ctx, point: Point, actor, value: str):
point.set_status(Point.Status.UPDATING)
actor.send(point.pk, ctx.chat.pk, value)
tasks.start(actor, point, Point.Status.UPDATING, ctx.chat, value)
ctx.reset()
ctx.reply(texts.CHANGE_STARTED, keyboard=texts.MAIN_KEYBOARD_WITH_POINTS)