in cookbooks/aws-parallelcluster-environment/files/custom_action_executor/custom_action_executor.py [0:0]
def _get_event(self, message: str, step: int = None, stage: str = None, error: any = None):
now = datetime.now(timezone.utc).isoformat(timespec="milliseconds")
return {
"datetime": now,
"version": 0,
"scheduler": "slurm",
"cluster-name": self.conf.cluster_name,
"node-role": self.conf.node_type,
"component": "custom-action",
"level": "ERROR",
"instance-id": self.conf.instance_id,
"event-type": "custom-action-error",
"message": message,
"detail": {
"action": self.conf.event_name,
"step": step,
"stage": stage,
"error": error,
},
}