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/http makeready can reset state #142

Merged
merged 7 commits into from May 26, 2020

Conversation

Julusian
Copy link
Member

@Julusian Julusian commented May 5, 2020

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

  • What is the current behavior? (You can also link to an open issue here)

  • What is the new behavior (if this is a feature change)?

  • Other information:

@Julusian Julusian requested a review from nytamin May 5, 2020 14:27
@Julusian
Copy link
Member Author

Julusian commented May 6, 2020

@nytamin as we discussed, there is now a queue in conductor. Instead of using syncFunction, I opted to use an off the shelf queue for promises p-queue. I did look at using syncFunction, but that would have required a fair bit of time to convert it from fibers to promises and this was easier.
I have handled the 'ignore' functionality, by doing the queue.add after the _resolveTimelineRunning guard.
And timeouts for makeReady is handled with the help of p-timeout

Additionally, I went though any uses of Promise.all and they are now using p-all so that it can block until all the child promises have completed and not reject early

@Julusian
Copy link
Member Author

Julusian commented May 6, 2020

During this I hit what appears to be #139, so have left one use of Promise.all which would be nice to remove also.

Also this appears to break support for node8

Copy link
Contributor

@nytamin nytamin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (pending actual testing ;) )

@Julusian Julusian force-pushed the fix/http-makeready-can-reset-state branch from 07815ef to 96d0410 Compare May 7, 2020 14:44
@codecov-io
Copy link

Codecov Report

Merging #142 into master will decrease coverage by 0.03%.
The diff coverage is 64.86%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #142      +/-   ##
==========================================
- Coverage   76.48%   76.45%   -0.04%     
==========================================
  Files          42       42              
  Lines        4853     4851       -2     
  Branches     1092     1099       +7     
==========================================
- Hits         3712     3709       -3     
- Misses       1097     1098       +1     
  Partials       44       44              
Impacted Files Coverage Δ
src/devices/casparCG.ts 68.13% <0.00%> (ø)
src/types/src/httpSend.ts 100.00% <ø> (ø)
src/types/src/tcpSend.ts 100.00% <ø> (ø)
src/devices/httpSend.ts 67.50% <57.14%> (+2.56%) ⬆️
src/devices/tcpSend.ts 91.30% <71.42%> (-1.29%) ⬇️
src/conductor.ts 87.24% <93.75%> (-0.26%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9b8f045...96d0410. Read the comment docs.

@Julusian Julusian marked this pull request as ready for review May 7, 2020 15:01
@Julusian Julusian merged commit ac706bd into master May 26, 2020
@Julusian Julusian deleted the fix/http-makeready-can-reset-state branch May 26, 2020 09:18
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.

None yet

3 participants