-
Notifications
You must be signed in to change notification settings - Fork 141
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
Use native threading module in job_manager #1096
Conversation
So the test are still passing. If I broke anything, we should consider adding a test for that. 😇 |
I have to admit that Im a little be disappointed but it was necessary 😢😢 |
Thanks for understanding. My goal is also to help future coders understand it. The main idea of using one queue and worker per repo/site is still there and it was brilliant! I can put the mutex stuff back. What is it needed for and can we add a test to test for the problem? |
Its not a good idea. The Job class add an abstraction (interface) and separate jobs manager from jobs itself. By doing this, it becomes difficult to know what jobs managers need (for example a repo_id function, a site_id property...). It will be difficult for another dev to rewrite the jobs manager if needed. |
OK. Undoing again. Also looking at locks real quick. |
fe8c052
to
e89d240
Compare
Put back your JobInterface, so it's all in one place. And added some locks and checks to avoid dupe jobs. Please help improve, so we get a good PR. |
4aa4881
to
a0c9907
Compare
Sorry @m3nu , I have an hackathon this week end so basically more than 20 hours of code 😅 |
No worries. All the best for the hackathon! I value your opinion and feedback, so will just keep it open here. |
Hello @m3nu I look at this today ! |
Is there something else you need @m3nu ? |
Some cleanup after adding the new jobs scheduler:
jobs_manager
with main appjob_scheduler
tojobs_manager
to match mainJobsManager
classif DEBUG
statements. Should uselogger.debug
instead.threading.Thread
class instead of QtQThreadpool
borg.jobs_manager.Job
withborg.borg_job
This is a big cleanup. I probably removed too many things. Please let me know if something is broken now or if anything should be put back.
@bastiencyr: Also, my apologies, if this changes much of your earlier PR. I just felt some things could be solved in a simpler way. I still envy the general idea and I'm happy I took the time to understand it in details.
Fixes #1094, fixes #1091, maybe fixes #1095