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

TaskDrivers - Split Configure Jobs to it's own function that gets called after the constructor. #282

Open
jkeon opened this issue Sep 26, 2023 · 0 comments

Comments

@jkeon
Copy link
Member

jkeon commented Sep 26, 2023

Sometimes we have Jobs that refer back up the same stack to a parent TaskDriver.

However, that parent TaskDriver isn't fully initialized yet so it will have null references or be a null reference itself depending on how you get access to it.

As a work around you can call a custom method on your TaskDriver after you instantiate it but that's a bit cumbersome.

A better solution would be to have all TaskDrivers implements an Abstract method to configure their jobs. This method will be called on all TaskDriver's right before Harden is called.

This would ensure the same macro order of operations happens but that the entire chain of relationships (parent and sub taskdrivers) and their data is initialized and ready to go.

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

1 participant