diff --git a/bothub/common/tasks.py b/bothub/common/tasks.py index 02f99f0d..84b688af 100644 --- a/bothub/common/tasks.py +++ b/bothub/common/tasks.py @@ -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, @@ -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="", + )