-
-
Notifications
You must be signed in to change notification settings - Fork 384
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
PICARD-2471: Restrict Picard to a single instance #2116
Conversation
I made a terrible mistake of not creating a proper branch when doing my initial PR. Actual work on the ticket starts with bab2ee7 |
Rebase your patch of latest master branch to clear out unwanted commits please. |
bb57233
to
2992e65
Compare
bffb753
to
2992e65
Compare
4685a5a
to
2992e65
Compare
Okay, commits should be good too |
Not sure what's wrong with the tests, that's odd. There is not even a test run started, and I can't seem to manually start it. But there is also a merge conflict since I merged #2127 that should be resolved. Not sure if this could be related? Maybe Github does not run the pipeline for unmergable PRs? |
I was thinking about it a bit, how about making It should close the listener when the file is deleted and picard will be able to exit correctly. |
And I thank you for the merge :) |
Please try that. But I'm still not 100% sure where it actually hangs. On exit it sets |
There's a progress but it's still unexitable, see:
|
@rdswift you might also want to take a look at the new help message |
When is this "unexitable" issue happening? In which situation(s)? |
As @phw mentioned, when you delete the pipe file yourself, Picard becomes unexitable, as you can see in the logs. Basically, the |
@skelly37 zas and I discussed this a bit. Let's get this PR merged as it is (after some final cleanup and closing of open discussions, e.g. the open discussion about the help output). We can tackle the closing issue separately. I think it should be handled, but it is not essential. Even if we don't find a proper solution it would be ok to just note this as a known issue. We can still try to fix this, though ;) We should also discuss how you continue from this point on. This turned out to be much easier to handle cross-platform than anticipated, also you cam into this project so well prepared :D You could help with some of the refactorings we want to do for Picard 3, or maybe we find some tasks related to this one (such as PICARD-2519, but this is a smaller thing, or maybe we have ideas on other ways this instance communication can be utilized). We also briefly discussed if there is some value to use DBus as the primary way of handling this single instance issue on platforms where this is available by default (Linux desktops mostly), and fall back to the pipe if not. Not really sure what the benefits would be and if it is worse the effort. I had some initial work done into this direction a while back, but abandoned it due to the limited support for other platforms. I'd suggest we discuss this on IRC, so we can get something interesting here. You probably have some ideas yourself ;) |
True, let’s open an issue with this when the PR will get merged
Hm, initially we were talking about better error prompts for users but the mentioned issues also seem to be interesting. Picard3 refactors and CLI enhancements like the URLs should be fine to start with, imo :)
Agreed, tho I’m low on time until Monday, I’ll reach you on Monday. |
Actually that fits me well |
Actually, give me 1h before merge, I might've come to a solution edit: nevermind, it didn't work out, you can merge |
Summary
This is a draft where we can discuss my GSoC project progress. Picard is going to work in single-instance mode thanks to named pipes
Problem
Ticket description is clear enough so I'll just paste it here:
When passing folders to Picard via command line (such as in Foobar), Picard will launch a new instance for each folder rather than loading them all in one instance. The ability to force it all into one instance would be helpful.
Solution
I've created a cross-platform communication protocol for Picard instances, based on named pipes. Now, in this draft, you can see my progress in integrating it into the Picard app.
TODO
-s
/--stand-alone-instance
argument to create a forced, standalone instance, that doesn't listen to any pipeNotes