diff --git a/aiida/orm/implementation/general/calculation/__init__.py b/aiida/orm/implementation/general/calculation/__init__.py index 42574bdbcf..f20a15c6dd 100644 --- a/aiida/orm/implementation/general/calculation/__init__.py +++ b/aiida/orm/implementation/general/calculation/__init__.py @@ -81,7 +81,21 @@ class AbstractCalculation(Sealable): calculations run via a scheduler. """ - _updatable_attributes = Sealable._updatable_attributes + ('state',) + FINISHED_KEY = '_finished' + FAILED_KEY = '_failed' + + _updatable_attributes = Sealable._updatable_attributes + ('state', FINISHED_KEY, FAILED_KEY) + _cacheable = False + + @classproperty + def _hash_ignored_attributes(cls): + return super(AbstractCalculation, cls)._hash_ignored_attributes + [ + '_sealed', + '_finished', + ] + + # The link_type might not be correct while the object is being created. + _hash_ignored_inputs = ['CALL'] # Nodes that can be added as input using the use_* methods @classproperty diff --git a/aiida/orm/implementation/general/calculation/work.py b/aiida/orm/implementation/general/calculation/work.py index ab12e2429c..1251aeac19 100644 --- a/aiida/orm/implementation/general/calculation/work.py +++ b/aiida/orm/implementation/general/calculation/work.py @@ -18,13 +18,11 @@ class WorkCalculation(Calculation): Used to represent a calculation generated by a Process from the new workflows system. """ - FINISHED_KEY = '_finished' - FAILED_KEY = '_failed' + ABORTED_KEY = '_aborted' DO_ABORT_KEY = '_do_abort' - _updatable_attributes = Calculation._updatable_attributes + ( - FINISHED_KEY, FAILED_KEY, ABORTED_KEY, DO_ABORT_KEY) + _updatable_attributes = Calculation._updatable_attributes + (ABORTED_KEY, DO_ABORT_KEY) @override def has_finished(self):