Skip to content

Commit

Permalink
Fix succces typo
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Feb 15, 2024
1 parent 44487a5 commit e781140
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/galaxy/celery/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def set_metadata(
dataset_instance.datatype.set_meta(dataset_instance)
dataset_instance.set_peek()
# Reset SETTING_METADATA state so the dataset instance getter picks the dataset state
dataset_instance.set_metadata_succces_state()
dataset_instance.set_metadata_success_state()
except Exception as e:
log.info(f"Setting metadata failed on {model_class} {dataset_instance.id}: {str(e)}")
dataset_instance.state = dataset_instance.states.FAILED_METADATA
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/jobs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1769,7 +1769,7 @@ def _finish_dataset(self, output_name, dataset, job, context, final_job_state, r
)
if not metadata_set_successfully:
if self.tool.tool_type == "expression":
dataset.set_metadata_succces_state()
dataset.set_metadata_success_state()
elif retry_internally:
# If Galaxy was expected to sniff type and didn't - do so.
if dataset.ext == "_sniff_":
Expand Down
4 changes: 2 additions & 2 deletions lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4409,13 +4409,13 @@ def state(self, state: Optional[DatasetState]):
if state in (DatasetState.FAILED_METADATA, DatasetState.SETTING_METADATA):
self._state = state
else:
self.set_metadata_succces_state()
self.set_metadata_success_state()
sa_session = object_session(self)
if sa_session:
sa_session.add(self.dataset)
self.dataset.state = state

def set_metadata_succces_state(self):
def set_metadata_success_state(self):
self._state = None

def get_file_name(self, sync_cache=True) -> str:
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3033,7 +3033,7 @@ def exec_after_process(self, app, inp_data, out_data, param_dict, job=None, **kw
dataset.state = param_dict.get("__ORIGINAL_DATASET_STATE__")
else:
# Revert dataset.state to fall back to dataset.dataset.state
dataset.set_metadata_succces_state()
dataset.set_metadata_success_state()
# Need to reset the peek, which may rely on metadata
# TODO: move this into metadata setting, setting the peek requires dataset access,
# and large chunks of the dataset may be read here.
Expand Down
4 changes: 2 additions & 2 deletions lib/galaxy/webapps/galaxy/controllers/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ def set_edit(self, trans, payload=None, **kwd):
annotation = sanitize_html(payload.get("annotation"))
self.add_item_annotation(trans.sa_session, trans.get_user(), data, annotation)
# if setting metadata previously failed and all required elements have now been set, clear the failed state.
if data._state == trans.model.Dataset.states.FAILED_METADATA and not data.missing_meta():
data._state = None
if data.state == trans.model.Dataset.states.FAILED_METADATA and not data.missing_meta():
data.set_metadata_success_state()
message = f"Attributes updated. {message}" if message else "Attributes updated."
else:
message = "Attributes updated, but metadata could not be changed because this dataset is currently being used as input or output. You must cancel or wait for these jobs to complete before changing metadata."
Expand Down

0 comments on commit e781140

Please sign in to comment.