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

Hey there! #35

Open
mondano opened this issue Jul 5, 2023 · 1 comment
Open

Hey there! #35

mondano opened this issue Jul 5, 2023 · 1 comment

Comments

@mondano
Copy link

mondano commented Jul 5, 2023

Hi there Thomas! I've been trying to find a way to contact you, by email or something but couldn't find it, so i guess i'll do it here. I love what you're doing and have been working in a similar direction. I'd love to chat :)

Here's my contact, shoot me a message!:
Telegram: ruzgarimski
Email: ruzgarimski [at] gmail.com

Wishing you a wonderful day,
Ruzgar Imski
ecsa, xorg,
semiover.se, unlike.work,
agency

@ThomasDeutsch
Copy link
Owner

ThomasDeutsch commented Jul 13, 2023

Thanks for the talk.
You can add flows dynamically by calling the .flow(..) function on any flow that you like.
For this, you can add flows to any other flows - not needed to add them to the scheduler directly, simply use the root-flow

const rootFlow = function* () {
  yield request(countEvent, 100); // INITIAL EVENT VALUE
  while (true) {
    yield askFor(countEvent, (next) => next < 106); // ASK THE USER TO SUBMIT A NEW COUNT VALUE
    console.log('askFor count', countEvent.value);
  }
}

new Scheduler({rootFlow});

// at any time you can do this:
rootFlow.flow('myAddedFlow', function*() ....)

// or remove flows dynamically
rootFlow.endFlow('myAddedFlow')

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

2 participants