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

WIP: Explore runSaga #777

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open

WIP: Explore runSaga #777

wants to merge 27 commits into from

Conversation

edolix
Copy link
Contributor

@edolix edolix commented Mar 31, 2023

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Mar 31, 2023

⚠️ No Changeset found

Latest commit: 7b0b22d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@edolix
Copy link
Contributor Author

edolix commented Apr 27, 2023

Rebased on dev

while (true) {
/**
* Wait for an initAction to start
*/
const action = yield take([initAction.type, reauthAction.type])
getLogger().info('RootSaga WAIT INIT')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Remove comments

logger.info('swStore >> Init Store?')
},
start: (rootSaga: Saga, options: any) => {
logger.info('swStore >> Start')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reduce logs

iAmmar7 and others added 6 commits May 3, 2023 18:11
* EventEmitter for each instance of a component

* remove branch from the main workflow

* add changeset

* add dev branch to workflow

* add dev branch to ci/cd
* Calling worker to fork call workers

* hanlde calling.call.state events

* handle calling.call.dial event and move dial function to the client

* fix answer() promise

* handle calling.call.collect event

* hanlde calling.call.send_digits event

* handle calling.call.detect event

* handle calling.call.tap event

* handle calling.call.prompt event

* handle calling.call.connect event

* override on, once, and off functions for the Call

* replace _on with on in e2e test cases

* include changeset

* fix playback event for prompt

* fix call.detect event with internal sdk worker

* unit test cases fix

* rebased with the dev

* replace overriden functions

* fix instanceMap arg

---------

Co-authored-by: edolix <[email protected]>
* Cleanup emitter transform for Voice Call APIs

* include changeset
* Use base event emitter for Message API

* emitter transform remove and changeset include

* ApplyEventListeners comment update
* base emitter for chat and pubsub api

* changeset included

* improve pubsub and chat worker initializing

* fix chat and pubsub e2e js case

* improve chat and pubsub e2e js case

* SDK child worker type fix

* type issues fix for sub workers

* more debug

* more debug in voiceCallPlayWorker

* update payload from voiceCallDialWorker

* run only voice test for now

* override event listeners for call instances

* fix node script

* fix voiceCallConnectWorker bug

* fix test cases for playback and recording

---------

Co-authored-by: edolix <[email protected]>
@edolix edolix force-pushed the eg/explore-run-saga branch from d2bd2d0 to 7b0b22d Compare May 4, 2023 15:17
@@ -33,7 +33,7 @@
"start:web": "sw-build --dev --web",
"start:node": "sw-build --dev --node --watchFormat=cjs",
"build": "tsc --project tsconfig.build.json && sw-build --web && sw-build --node",
"test": "NODE_ENV=test jest --detectOpenHandles --forceExit",
"test": "NODE_ENV=test jest",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just trying to understand, why have we removed the --detectOpenHandles. Shouldn't we keep it to observe if Jest exits cleanly?

dispatch(action: AnyAction) {
logger.info('swStore >> Dispatch', action)

// Process the action within reducers
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe we can add a TODO for future reference to move this logic to a reducer.

init: () => {
logger.info('swStore >> Init Store?')
},
start: (rootSaga: Saga, options: any) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the runWorker function does the same thing. Maybe we can remove one? Also, we will have to update it here.

@@ -124,17 +108,26 @@ const configureStore = (options: ConfigureStoreOptions) => {
remove: deleteInstance,
},
})

// return sagaMiddleware.run(saga, {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Forgot to remove these comments related to the old middleware logic?

@edolix edolix force-pushed the dev branch 3 times, most recently from 2703f14 to bbe5b55 Compare May 22, 2023 17:45
Base automatically changed from dev to main June 6, 2023 08:39
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