support executing global setup function early to provide environment for subsequent dependencies#220
Open
bsync wants to merge 4 commits intopgiri:masterfrom
Open
support executing global setup function early to provide environment for subsequent dependencies#220bsync wants to merge 4 commits intopgiri:masterfrom
bsync wants to merge 4 commits intopgiri:masterfrom
Conversation
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 patch 1
Author
|
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. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.