Skip to content

Commit

Permalink
Fix: PluginVersionProvider should cache process class (#4683)
Browse files Browse the repository at this point in the history
Currently, the `PluginVersionProvider` is caching process instance, rather than class.
This commit fixes the bug, meaning the cache will now work correctly.
Removing the reference to the process instance also is a step towards allowing it to be garbage collected.
  • Loading branch information
chrisjsewell authored Jan 27, 2021
1 parent 950d1a4 commit 02ebeb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aiida/engine/processes/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ def _setup_db_record(self) -> None:

def _setup_metadata(self) -> None:
"""Store the metadata on the ProcessNode."""
version_info = self.runner.plugin_version_provider.get_version_info(self)
version_info = self.runner.plugin_version_provider.get_version_info(self.__class__)
self.node.set_attribute_many(version_info)

for name, metadata in self.metadata.items():
Expand Down

0 comments on commit 02ebeb8

Please sign in to comment.