Skip to content

Conversation

@taburineagle
Copy link
Owner

Adding the better parallelization routines to the main branch.

Re-wrote connect and disconnect calls to asynchronously attempt multiple connect(s) and disconnect(s) in parallel instead of doing them one at a time.
Changed check for power/channel status from light to make *sure* it's looking at the right kind of data to set the table up correctly by verifying the category of data its looking at is 100% correct instead of assuming it is.
Like the title says, more parallelization improvements!  Connecting and disconnecting is handled all at the same time, instead of one at a time, and the HTTP server now uses those techniques as well as the GUI version.

Also, as a solution to #20, NeewerLite-Python now creates a lockfile at launch, and deletes it at exit, to make sure only one copy of NEP is running at one time.  This could be refined a bit, into a "do you want to launch a new copy anyway" prompt, but that's not part of it *yet*.
Added --force_instance command to force NeewerLite-Python to launch even if a lockfile already exists (#20)
- Added dialog to the GUI to ask the same question as above ("There is already an instance running, are you sure you want to force-open a new one")
- Tweaked the channel/power return function slightly (#21)
- Refined channel/power check (from workerThread) by implementing a list (currently only NEEWER-RGB176) that don't feed that data back - so we don't need to check them
- Refined setTheTable as well, implementing a check to not update the table if the data being submitted is the same as the data already in the table
- Added another second of delay before trying to re-link a light for the 2nd time
@taburineagle
Copy link
Owner Author

This PR adds better parallelization in connecting and disconnecting to lights, a lockfile system (to ensure NeewerLite-Python can only run one instance), and a few other improvements.

@taburineagle taburineagle merged commit 8ca44e4 into main Jan 18, 2022
@taburineagle taburineagle deleted the WIP-better-parallelization branch January 18, 2022 15:19
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

Successfully merging this pull request may close these issues.

2 participants