Skip to content

Commit

Permalink
boutiques descriptor refresh for tool config without descriptor path a…
Browse files Browse the repository at this point in the history
  • Loading branch information
MontrealSergiy committed Dec 5, 2023
1 parent a18519a commit fcd9b8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions BrainPortal/app/models/tool_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -593,14 +593,14 @@ def self.register_descriptor(descriptor, tool_name, tool_version) #:nodoc:
def self.registered_boutiques_descriptor(tool_name, tool_version) #:nodoc:
@_descriptors_ ||= {}
key = [ tool_name, tool_version ] # two strings
@_descriptors_[key]
@_descriptors_[key] = @_descriptors_[key]&.reload_if_file_timestamp_changed
end

def boutiques_descriptor
if @_descriptor_
@_descriptor_ = @_descriptor_.reload_if_file_timestamp_changed
key = [ self.tool.name, self.version_name ] # two strings
@_descriptors_[key] = @_descriptor_ if @_descriptors_.has_key? key
@_descriptors_[key] = @_descriptor_
return @_descriptor_
end
path = boutiques_descriptor_path.presence
Expand Down

0 comments on commit fcd9b8c

Please sign in to comment.