Jason Wiener
10/15/2024, 6:27 PM# Run scheduled jobs
results = run_db_sheets_job.with_options(persist_result=True, result_storage=result_persistence_location).map(scheduled)
# Process the results, allowing Futures from mapped jobs to resolve
to_notify = process_results(results=quote(results))
I want process_results() to wait for all results from run_db_sheets_job() but I see this in the log:
12:14:21.520 | INFO | Flow run 'cocky-degu' - Created task run 'run_db_sheets_job-0' for task 'run_db_sheets_job'
12:14:21.522 | INFO | Flow run 'cocky-degu' - Submitted task run 'run_db_sheets_job-0' for execution.
12:14:21.825 | INFO | Flow run 'cocky-degu' - Created task run 'process_results-0' for task 'process_results'
12:14:21.827 | INFO | Flow run 'cocky-degu' - Executing 'process_results-0' immediately...
It looks like process_results() does not complete until all the mapped jobs in run_db_sheets_job() have an outcomes but I would like to understand this better. How do the internal states of results and to_notify evolve over the course of the flow both tasks are embedded in?Marvin
10/15/2024, 6:27 PMrun_db_sheet_job() and process_results() are both tasks, used as below.
# Run scheduled jobs
results = run_db_sheets_job.with_options(persist_result=True, result_storage=result_persistence_location).map(scheduled)
# Process the results, allowing Futures from mapped jobs to resolve
to_notify = process_results(results=quote(results))
I want process_results() to wait for all results from run_db_sheets_job() but I see this in the log:
12:14:21.520 | INFO | Flow run 'cocky-degu' - Created task run 'run_db_sheets_job-0' for task 'run_db_sheets_job'
12:14:21.522 | INFO | Flow run 'cocky-degu' - Submitted task run 'run_db_sheets_job-0' for execution.
12:14:21.825 | INFO | Flow run 'cocky-degu' - Created task run 'process_results-0' for task 'process_results'
12:14:21.827 | INFO | Flow run 'cocky-degu' - Executing 'process_results-0' immediately...
It looks like process_results() does not complete until all the mapped jobs in run_db_sheets_job() have an outcomes but I would like to understand this better. How do the internal states of results and to_notify evolve over the course of the flow both tasks are embedded