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

Method get

src/web/server.py:699–720  ·  view source on GitHub ↗
(self, user, execution_id)

Source from the content-addressed store, hash-verified

697 @check_authorization
698 @inject_user
699 def get(self, user, execution_id):
700 if is_empty(execution_id):
701 respond_error(self, 400, 'Execution id is not specified')
702 return
703
704 try:
705 history_entry = self.application.execution_logging_service.find_history_entry(execution_id, user.user_id)
706 except AccessProhibitedException:
707 respond_error(self, 403, 'Access to execution #' + str(execution_id) + ' is prohibited')
708 return
709
710 if history_entry is None:
711 respond_error(self, 400, 'No history found for id ' + execution_id)
712 return
713
714 log = self.application.execution_logging_service.find_log(execution_id)
715 if is_empty(log):
716 LOGGER.warning('No log found for execution ' + execution_id)
717
718 running = self.application.execution_service.is_running(history_entry.id, user)
719 long_log = to_long_execution_log(history_entry, log, running)
720 self.write(json.dumps(long_log))
721
722
723@tornado.web.stream_request_body

Callers

nothing calls this directly

Calls 7

is_emptyFunction · 0.90
respond_errorFunction · 0.90
to_long_execution_logFunction · 0.90
find_history_entryMethod · 0.80
find_logMethod · 0.80
is_runningMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected