package nomad import ( "context" "fmt" "github.com/getsentry/sentry-go" "github.com/openHPI/poseidon/pkg/dto" "io" "regexp" "strconv" "time" ) var ( // timeDebugMessageFormat is the format of messages that will be converted to debug messages. timeDebugMessageFormat = `echo -ne "\x1EPoseidon %s $(date +%%s%%3N)\x1E"` // Format Parameters: 1. Debug Comment, 2. command. timeDebugMessageFormatStart = timeDebugMessageFormat + `; %s` // Format Parameters: 1. command, 2. Debug Comment. timeDebugMessageFormatEnd = `%s; ` + dto.WrapBashCommand(`ec=$?; `+timeDebugMessageFormat+` && exit $ec`) timeDebugMessagePattern = regexp.MustCompile( `(?P.*)\x1EPoseidon (?P.+) (?P