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

How to dynamically add jobs to a running workflow? #87

Open
tristanjahier opened this issue Oct 26, 2023 · 6 comments
Open

How to dynamically add jobs to a running workflow? #87

tristanjahier opened this issue Oct 26, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@tristanjahier
Copy link

tristanjahier commented Oct 26, 2023

Hello, I am trying to figure out how to program the following workflow:

  • step 1: do some work and store the results in a DB table (lots of rows).
  • step 2: read the results from the DB table, and process them but in batches of 1000 for example, because the total number of rows to process is way too high for a single job.

The problem is that when defining step 2, I cannot know at definition time what is the data to process, and how many rows there are, therefore how many jobs I need to spawn to process everything in batches.

I can handle step 2 with a job that spawns/dispatches child jobs at runtime, but I do not know how to bind them properly to the existing and already running workflow.

Is it currently possible to achieve with Venture? If so, could someone give me a hint please?

@ksassnowski
Copy link
Owner

Unfortunately, it currently isn't possible to dynamically add jobs to a running workflow. It's something I'm still working on solving.

@ksassnowski ksassnowski added the enhancement New feature or request label Oct 27, 2023
@tristanjahier
Copy link
Author

Understood! 🥲
Is there any way to circumvent this limitation with a dirty hack in user land?

@ksassnowski
Copy link
Owner

Not really, unfortunately.

The good news is that I think I just came up with the solution to this problem. I have a working prototype locally that let's you dynamically add jobs to a running workflow. I might be able to finish this up this weekend or next week 👍

@tristanjahier
Copy link
Author

OK got it, thank you for the quick answers!
Don't worry, no rush. Thank you for your work man. 🙂

@travisaustin
Copy link

@ksassnowski Thanks for your awesome project.

Just curious if you made any progress on this enhancement.

@tristanjahier
Copy link
Author

Ping! I am once again facing the situation where it would be much more convenient to do this. Does anyone knows?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants