Skip to content

Conversation

@bsync
Copy link

@bsync bsync commented Jun 3, 2021

No description provided.

bsync added 4 commits June 3, 2021 11:23
The addition of an 'immediate' function call feature to the JobCluster's setup logic allows subsequent items in the 'depends' list to include code that cannot otherwise be defined due to missing module imports at the global level... i.e. declaring a custom class that itself extends a builtin class which must be imported as a base class.
Modified example to show the potential need for a 'nodeinit_setup' which executes immediately after it is serialized to the node.  This feature means that classes like the class 'C' in the example can extend other python builtin classes like the 'cmd' class.
@bsync
Copy link
Author

bsync commented Jun 3, 2021

Above commits show a rudimentary way to support immediate mode setup of a dispynode so that subsequent items from the JobCluster's "depends" list can globally refer to imported modules as they are being deserialized.

There may be a better way to accomplish this but if you check out my modification to your obj_instances.py example you should see the problem I was running into.

@bsync bsync changed the title Patch 1 support executing global setup function early to provide environment for subsequent dependencies Jun 3, 2021
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

Successfully merging this pull request may close these issues.

1 participant