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

service calls are skipped when called in quick succession #60

Open
Switch123456789 opened this issue Dec 12, 2023 · 3 comments
Open

service calls are skipped when called in quick succession #60

Switch123456789 opened this issue Dec 12, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Switch123456789
Copy link

Hey hey,
I noticed an issue whenever services are called in quick succession, sometimes (not always) only the first command gets executed. For example, I have a ha-script that sets consume_mode shuffle & repeat in this order but the only thing that gets applied is the consume-mode.

@bushvin bushvin self-assigned this Dec 12, 2023
@bushvin bushvin added the bug Something isn't working label Dec 12, 2023
@Switch123456789
Copy link
Author

I did A LOT of testing and found out that calls in succession work fine but calls in parallel occasionally cause one or more calls to get skipped.

The reason why only consume mode is set in my first example is that another script is running in parallel that adds a song to the playlist and it is pretty random which call gets skipped if one or more calls are executed in parallel. I am 90% sure about that assessment. I will keep on testing :)

@bushvin
Copy link
Owner

bushvin commented Dec 13, 2023

The actions which did not result in the expected state, did they return an error?
The only thing I can think of which might be happening, is that the Mopidy client api wrapper is busy and drops requests while it is busy.
Time to introduce a task queue, maybe...

@Switch123456789
Copy link
Author

The actions which did not result in the expected state, did they return an error?

I have to reproduce that to check for errors. I already adjusted my scripts to work around that. In hindsight, doing it in parallel wasn't a good idea for me anyway 😄 Next year I will get back at it, test and report, as I do 😸

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

No branches or pull requests

2 participants