Skip to content

Commit

Permalink
Send recent activities on EDA
Browse files Browse the repository at this point in the history
  • Loading branch information
zMardone committed Feb 26, 2024
1 parent c55b384 commit 5f1dc56
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bothub/common/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from django_elasticsearch_dsl.registries import registry

from bothub import translate
from bothub.event_driven.publisher.rabbitmq_publisher import RabbitMQPublisher
from bothub.celery import app
from bothub.common.models import (
RepositoryQueueTask,
Expand Down Expand Up @@ -688,5 +689,9 @@ def create_repository_project(**kwargs):

@app.task(name="send_recent_activity")
def send_recent_activity(recent_activity_data):
connect_client = ConnectClient()
connect_client.create_recent_activity(recent_activity_data=recent_activity_data)
rabbitmq_publisher = RabbitMQPublisher()
rabbitmq_publisher.send_message(
body=recent_activity_data,
exchange="recent_activities.topic",
routing_key="",
)

0 comments on commit 5f1dc56

Please sign in to comment.