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

Make worker asynchronous and stoppable #145

Merged
merged 12 commits into from
May 3, 2023
Merged

Make worker asynchronous and stoppable #145

merged 12 commits into from
May 3, 2023

Conversation

callumforrester
Copy link
Contributor

Changes:

  • Change worker API from run_forever to stop and start
  • Make start run worker in its own thread

@codecov
Copy link

codecov bot commented Apr 24, 2023

Codecov Report

Merging #145 (0c22c87) into main (28042db) will increase coverage by 8.33%.
The diff coverage is 94.82%.

@@            Coverage Diff             @@
##             main     #145      +/-   ##
==========================================
+ Coverage   74.62%   82.95%   +8.33%     
==========================================
  Files          38       39       +1     
  Lines        1056     1103      +47     
==========================================
+ Hits          788      915     +127     
+ Misses        268      188      -80     
Impacted Files Coverage Δ
src/blueapi/service/app.py 40.35% <0.00%> (ø)
src/blueapi/worker/reworker.py 79.75% <95.23%> (+46.42%) ⬆️
src/blueapi/core/__init__.py 100.00% <100.00%> (ø)
src/blueapi/core/bluesky_event_loop.py 100.00% <100.00%> (ø)
src/blueapi/worker/multithread.py 100.00% <100.00%> (+33.33%) ⬆️
src/blueapi/worker/worker.py 100.00% <100.00%> (ø)

... and 4 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@callumforrester callumforrester marked this pull request as ready for review May 3, 2023 07:16
@callumforrester
Copy link
Contributor Author

@RAYemelyanova I think this this is ready now

Copy link
Contributor

@rosesyrett rosesyrett left a comment

Choose a reason for hiding this comment

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

looks good, I've got a couple of comments about small things.

tests/worker/test_reworker.py Outdated Show resolved Hide resolved
src/blueapi/worker/reworker.py Outdated Show resolved Hide resolved
@callumforrester callumforrester merged commit b6453d9 into main May 3, 2023
@callumforrester callumforrester deleted the async-worker branch May 3, 2023 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants