Skip to content

Conversation

ldmi3i
Copy link
Collaborator

@ldmi3i ldmi3i commented Jul 31, 2022

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change

closes #11

  • Waiting for review
  • Waiting for comment resolution
  • Waiting for merge
  • Draft

Semantic Versioning

  • This is a feat change

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Added unit tests and possibility to deploy service with the docker-compose

Automated

Just go test ./...

Manual

To deploy changes with the docker-compose you can use the next command from the project root:
docker-compose -f ./docker/docker-compose-dev.yml up -d --build

After docker has been started you can go to the http://localhost:15672 , auth with guest/guest, and move to the Queues tab.
Queues for the listeners will be created automatically (here it is 'data-scraping-asd')
You need to create queues for the publishers if you want to observe posted results (you need to add 'storage-update-asd' and 'gateway-scrape_notifications').
After just clicking 'data-scraping-asd' from the list, open Publish Message and put the request body here.
It needs to be something like that: {"FileUrl":"test url","IsNotifyUser":true} (true if you want notification to the 'gateway-scrape_notifications' queue)
You can see consumed messages in the dss container logs ('docker logs dss' or from the ide/docker-desktop)
And get them in the queue management - just click the required queue from the Queues page and fine GetMessage below the charts.

Checklist:

  • My commit message mentions fix, feat, BREAKING CHANGE accordingly to increase the semantic versioning
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have checked my code/docs and corrected any misspellings

@ldmi3i ldmi3i added this to the Proof of concept milestone Jul 31, 2022
@ldmi3i ldmi3i marked this pull request as ready for review August 1, 2022 08:32
@ldmi3i ldmi3i added the review required The pull request is ready and needs to be reviewed or just requesting view from the outside. label Aug 1, 2022

//NewPublisher creates a publisher and connects to the rabbit under the hood.
//This method appears to be not testable cause it combines 2 responsibilities: create an instance and connect to a queue.
//I think we may rely on NewPublisher has been already tested in the library.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree

@ldmi3i ldmi3i merged commit 79e12b5 into main Aug 5, 2022
@ldmi3i ldmi3i deleted the queue_setup branch August 5, 2022 15:24
@github-actions
Copy link

github-actions bot commented Aug 5, 2022

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released review required The pull request is ready and needs to be reviewed or just requesting view from the outside.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setup queue event listener
2 participants