Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add proof of async tasks with dramatic and periodiq #10

Closed
wants to merge 2 commits into from

Conversation

falvaradorodriguez
Copy link
Contributor

@falvaradorodriguez falvaradorodriguez commented Nov 29, 2024

This RP is not intended to be mergable. It is therefore kept as a draft.

It is used as a proof of concept for dramatiq and periodiq in conjunction with FastAPI.

In the proof of concept the following is done:

  • A queue is created simulating the queue that will contain the events of the contracts.
  • Use pika to consume events from the queue and launch an asynchronous task.
  • The asynchronous tasks are managed with dramatiq.
  • An example of a cron task is also added, with periodiq to validate that dramatiq and celery can potentially do the same (https://dramatiq.io/motivation.html#compared-to)

It is possible to send test messages to the queue using python scripts/send_test_message_rabbitmq.py.

@falvaradorodriguez falvaradorodriguez force-pushed the async-tasks-proof-of-concept branch 2 times, most recently from 5ed279f to c303baa Compare November 29, 2024 14:34
@coveralls
Copy link

coveralls commented Nov 29, 2024

Pull Request Test Coverage Report for Build 12144205327

Details

  • 29 of 47 (61.7%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+1.3%) to 75.258%

Changes Missing Coverage Covered Lines Changed/Added Lines %
app/main.py 4 7 57.14%
app/workers/tasks.py 14 20 70.0%
app/consumers/queue_consumer.py 8 17 47.06%
Totals Coverage Status
Change from base Build 12119268343: 1.3%
Covered Lines: 73
Relevant Lines: 97

💛 - Coveralls

@falvaradorodriguez falvaradorodriguez force-pushed the async-tasks-proof-of-concept branch 3 times, most recently from 47ae01d to 0e08762 Compare December 2, 2024 12:05
@falvaradorodriguez falvaradorodriguez force-pushed the async-tasks-proof-of-concept branch from 0e08762 to 3612bf1 Compare December 3, 2024 16:41
@github-actions github-actions bot locked and limited conversation to collaborators Dec 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants