MCPcopy Index your code
hub / github.com/bugy/script-server / find_history_entry

Method find_history_entry

src/execution/logging.py:195–212  ·  view source on GitHub ↗
(self, execution_id, user_id)

Source from the content-addressed store, hash-verified

193 return result
194
195 def find_history_entry(self, execution_id, user_id):
196 self._renew_files_cache()
197
198 file = self._ids_to_file_map.get(execution_id)
199 if file is None:
200 LOGGER.warning('find_history_entry: file for %s id not found', execution_id)
201 return None
202
203 entry = self._extract_history_entry(file)
204 if entry is None:
205 LOGGER.warning('find_history_entry: cannot parse file for %s', execution_id)
206
207 elif not self._can_access_entry(entry, user_id):
208 message = 'User ' + user_id + ' has no access to execution #' + str(execution_id)
209 LOGGER.warning('%s. Original user: %s', message, entry.user_id)
210 raise AccessProhibitedException(message)
211
212 return entry
213
214 def find_log(self, execution_id):
215 self._renew_files_cache()

Calls 5

_renew_files_cacheMethod · 0.95
_can_access_entryMethod · 0.95
getMethod · 0.45