You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constworkflow=newWorkflow().add(newFetchData()).map([newTransformData(),newBackupData()])// Runs both in parallel.reduce(newSaveToDatabase());// Merges both outputsawaitworkflow.run();
If I did this, could get away from always using ArrayTask, and only using it for reduce().
reduce strategies:
array: assumes inputs and outputs are the same, and will turn them into arrays
object_by_id: create an object where the id is the key
object_by_type: create an object where the key is the task type (create arrays if duplicate task types or error?)
entries_by_id: return an array [id, results],[id2, results]
entries_by_type
The text was updated successfully, but these errors were encountered:
If I did this, could get away from always using ArrayTask, and only using it for
reduce()
.reduce strategies:
The text was updated successfully, but these errors were encountered: