def upload_resource_status_end(self, exit_code, *resources): timestamp = util.now_timestamp_rfc_3339() for resource in resources: status = self.get_resource_status(resource) if status.get("end") != None: continue status["end"] = timestamp status["exit_code"] = exit_code key = self.resource_status_key(resource) self.storage.put_json(status, key)
def upload_resource_status_end(self, exit_code, *resources): timestamp = util.now_timestamp_rfc_3339() for resource in resources: status = self.get_resource_status(resource) if status.get("end") != None: continue status["end"] = timestamp status["exit_code"] = exit_code key = self.resource_status_key(resource) aws.upload_json_to_s3(status, key, self.bucket)
def upload_resource_status_start(self, *resources): timestamp = util.now_timestamp_rfc_3339() for resource in resources: key = self.resource_status_key(resource) status = { "resource_id": resource["id"], "resource_type": resource["resource_type"], "workload_id": resource["workload_id"], "app_name": self.app["name"], "start": timestamp, } self.storage.put_json(status, key)
def upload_resource_status_start(self, *resources): timestamp = util.now_timestamp_rfc_3339() for resource in resources: key = self.resource_status_key(resource) status = { "resource_id": resource["id"], "resource_type": resource["resource_type"], "workload_id": resource["workload_id"], "app_name": self.app["name"], "start": timestamp, } aws.upload_json_to_s3(status, key, self.bucket)