fix
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
import os
|
||||
import grpc
|
||||
from queues import tasks_pb2_grpc
|
||||
|
||||
|
||||
stage = os.getenv("STAGE", 'local')
|
||||
@@ -11,8 +9,5 @@ else:
|
||||
|
||||
|
||||
class Daemon:
|
||||
def __init__(self):
|
||||
self.channel = grpc.insecure_channel(QUEUES_URL)
|
||||
self.stub = tasks_pb2_grpc.TasksStub(channel=self.channel)
|
||||
def execute(self):
|
||||
raise NotImplemented
|
||||
|
||||
@@ -49,7 +49,6 @@ class Daemon(base.Daemon, queues.TasksHandlerMixin):
|
||||
|
||||
def reply(self, text: str, chat_id: int, message_id: int):
|
||||
queues.set_task(
|
||||
self.stub,
|
||||
'botalka_mailbox',
|
||||
{
|
||||
'project': 'pizda-bot',
|
||||
@@ -65,7 +64,6 @@ class Daemon(base.Daemon, queues.TasksHandlerMixin):
|
||||
|
||||
def send(self, text: str, chat_id: int):
|
||||
queues.set_task(
|
||||
self.stub,
|
||||
'botalka_mailbox',
|
||||
{
|
||||
'project': 'pizda-bot',
|
||||
|
||||
Reference in New Issue
Block a user