def get(self, package_process_uuid):
     LOG.info("GET to /packages/status/ w. args: {}".format(
         package_process_uuid),
              extra={"start_stop": "START"})
     p = PM.get_packager(package_process_uuid)
     if p is None:
         LOG.warning("GET to /packages/status/ done",
                     extra={
                         "start_stop": "STOP",
                         "status": 404
                     })
         return {
             "error_msg":
             "Package process not found: {}".format(package_process_uuid)
         }, 404
     LOG.info("GET to /packages/status/ done",
              extra={
                  "start_stop": "STOP",
                  "status": p.status
              })
     return {
         "package_process_uuid": str(p.uuid),
         "status": p.status,
         "error_msg": p.error_msg
     }
Exemple #2
0
 def get(self, package_process_uuid):
     p = PM.get_packager(package_process_uuid)
     if p is None:
         return {
             "error_msg":
             "Package process not found: {}".format(package_process_uuid)
         }, 404
     return {
         "package_process_uuid": str(p.uuid),
         "status": p.status,
         "error_msg": p.error_msg
     }