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

fix random Timer too close or Move queue overflow errors #123

Merged
merged 5 commits into from
Jun 17, 2024

Conversation

Frix-x
Copy link
Owner

@Frix-x Frix-x commented Jun 17, 2024

Summary by Sourcery

This pull request addresses random 'Timer too close' and 'Move queue overflow' errors by adjusting process priority and improving timeout handling. It also enhances the reliability of file writing operations by introducing a queue and separate processes for writing accelerometer data, ensuring all file writes are completed before proceeding.

  • Bug Fixes:
    • Fixed random 'Timer too close' and 'Move queue overflow' errors by adjusting process priority and timeout handling.
  • Enhancements:
    • Introduced reactor-based timeout management in ShakeTuneProcess to improve reliability.
    • Added a queue and separate processes for writing accelerometer data to files to prevent blocking the main process.
    • Ensured all file writes are completed before proceeding by adding wait_for_file_writes method in Accelerometer class.

Copy link

sourcery-ai bot commented Jun 17, 2024

Reviewer's Guide by Sourcery

This pull request addresses issues with random 'Timer too close' and 'Move queue overflow' errors by modifying the ShakeTuneProcess to include a reactor for better timeout handling and process priority adjustments. Additionally, it introduces multiprocessing for file writing in the Accelerometer class and ensures all file writes complete before proceeding in various command methods.

File-Level Changes

Files Changes
shaketune/commands/create_vibrations_profile.py
shaketune/commands/axes_map_calibration.py
shaketune/commands/axes_shaper_calibration.py
shaketune/commands/compare_belts_responses.py
shaketune/commands/excitate_axis_at_freq.py
Added calls to wait_for_file_writes after stopping accelerometer measurements to ensure all data is written before proceeding.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

@Frix-x Frix-x added the bug Something isn't working label Jun 17, 2024
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @Frix-x - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 7 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

shaketune/shaketune_process.py Show resolved Hide resolved
shaketune/shaketune_process.py Show resolved Hide resolved
shaketune/shaketune_process.py Outdated Show resolved Hide resolved
shaketune/commands/accelerometer.py Show resolved Hide resolved
shaketune/commands/accelerometer.py Show resolved Hide resolved
shaketune/commands/accelerometer.py Show resolved Hide resolved
shaketune/commands/accelerometer.py Show resolved Hide resolved
@Frix-x
Copy link
Owner Author

Frix-x commented Jun 17, 2024

This should fix #117 #120 and #123

@Frix-x Frix-x self-assigned this Jun 17, 2024
@Frix-x Frix-x merged commit a9c7a84 into main Jun 17, 2024
2 checks passed
@Frix-x Frix-x deleted the fix-timer-too-close branch June 17, 2024 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant