diff options
author | Angelos Evripiotis <jevripiotis@bloomberg.net> | 2019-10-17 14:28:45 +0100 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-10-25 14:09:55 +0000 |
commit | a125bc07d3fec9d0a9aad52fc167ff6744d8f396 (patch) | |
tree | daed16986e3a94776fe8c0ba529a0289e241afc2 /src/buildstream/_scheduler | |
parent | 04e1c533e6a25f4136dfc95c05b29047c94efeab (diff) | |
download | buildstream-a125bc07d3fec9d0a9aad52fc167ff6744d8f396.tar.gz |
job pickling: pickle first_pass_config factories
Note that for multiple-pass setups, i.e. where we have junctions, we
also have to pickle things that belong to the 'first_pass_config'.
Diffstat (limited to 'src/buildstream/_scheduler')
-rw-r--r-- | src/buildstream/_scheduler/jobs/jobpickler.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/buildstream/_scheduler/jobs/jobpickler.py b/src/buildstream/_scheduler/jobs/jobpickler.py index 82900eb5b..d514e87ae 100644 --- a/src/buildstream/_scheduler/jobs/jobpickler.py +++ b/src/buildstream/_scheduler/jobs/jobpickler.py @@ -84,7 +84,9 @@ def pickle_child_job(child_job, projects): for p in projects for factory in [ p.config.element_factory, + p.first_pass_config.element_factory, p.config.source_factory, + p.first_pass_config.source_factory, ] ] @@ -99,11 +101,11 @@ def pickle_child_job(child_job, projects): pickler = pickle.Pickler(data) pickler.dispatch_table = copyreg.dispatch_table.copy() - def _reduce_plugin(plugin): + def reduce_plugin(plugin): return _reduce_plugin_with_factory_dict(plugin, plugin_class_to_factory) for cls in plugin_class_to_factory: - pickler.dispatch_table[cls] = _reduce_plugin + pickler.dispatch_table[cls] = reduce_plugin pickler.dispatch_table[ArtifactProto] = _reduce_proto pickler.dispatch_table[DigestProto] = _reduce_proto pickler.dispatch_table[Loader] = _reduce_object |