-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add globals and kwargs to Workflow and Job (#113)
* Add globals to Workflow and Job For shared functionality across Workflow classes that depends on some variable data, it's useful to have named parameters for the Workflow that are automatically forwarded to all Job instances. This commit adds a `globals` keyword arg to the Workflow initializer, which should be a hash that is then stored in a `globals` hash attribute, is persisted, and is merged into the `params` sent to each Job instance. * Add kwargs to Workflow For workflows that take a larger number of parameters or optional parameters, it's useful to specify these as keyword arguments rather than positional ones. This commit adds support to `Workflow#initialize` for kwargs, and stores them in a new `kwargs` attribute. --------- Co-authored-by: Noah Harrison <[email protected]>
- Loading branch information
1 parent
6e87f60
commit 68bc23f
Showing
6 changed files
with
87 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters