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 redundant endpoint calls for updating selected lights #13

Open
mgibbs1259 opened this issue Sep 19, 2023 · 0 comments
Open

Fix redundant endpoint calls for updating selected lights #13

mgibbs1259 opened this issue Sep 19, 2023 · 0 comments

Comments

@mgibbs1259
Copy link
Owner

Is your feature request related to a problem? Please describe.
When a user changes the input lights, we make two endpoint calls. The first is to terminate the existing spotihue task and the second is to restart the spotihue task with the new lights. Instead of doing this, we should just replace the lights list with the updated one in the currently running task.

Describe the solution you'd like
Consider taking the diff between currently running task lights and new request's input lights, and using task.replace({new lights list}) in the case of the lights lists differing (ie, replacing the currently running task in 1 endpoint call instead of terminating it and then re-running it in 2 endpoint calls)

Describe alternatives you've considered
NA

Additional context
NA

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

No branches or pull requests

1 participant