Implemented classifier cache
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -8,7 +8,7 @@ import json
|
||||
from sentry_sdk.integrations.logging import LoggingIntegration
|
||||
import sentry_sdk
|
||||
|
||||
from magic_doer import run_everything
|
||||
from magic_doer import MagicDoer
|
||||
|
||||
|
||||
def message_callback(channel, method, properties, body):
|
||||
@@ -18,7 +18,7 @@ def message_callback(channel, method, properties, body):
|
||||
logging.warning(f"Invalid message recieved: {e}")
|
||||
return
|
||||
|
||||
results = run_everything(msg) # <- This is where the magic happens
|
||||
results = MagicDoer.run_everything(msg) # <- This is where the magic happens
|
||||
|
||||
channel.basic_publish(
|
||||
exchange=os.environ['PIKA_OUTPUT_EXCHANGE'],
|
||||
@@ -57,6 +57,7 @@ def main():
|
||||
queue_name = queue_declare_result.method.queue
|
||||
|
||||
channel.queue_bind(exchange=os.environ['PIKA_INPUT_EXCHANGE'], queue=queue_name)
|
||||
|
||||
channel.basic_consume(queue=queue_name, on_message_callback=message_callback, auto_ack=True)
|
||||
|
||||
logging.info("Connection complete! Listening to messages...")
|
||||
|
||||
Reference in New Issue
Block a user