-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some improvements in my opinion for kubernetes #40
base: main
Are you sure you want to change the base?
Conversation
added Process.PID added started_at time in log
Some improvements in my opinion for kubernetes |
@@ -34,7 +34,7 @@ func NewRunner() *Runner { | |||
func (r *Runner) Add(cronjob CrontabEntry) error { | |||
_, err := r.cron.AddFunc(cronjob.Spec, r.cmdFunc(cronjob, func(execCmd *exec.Cmd) bool { | |||
// before exec callback | |||
log.WithFields(LogCronjobToFields(cronjob)).Infof("executing") | |||
// log.WithFields(LogCronjobToFields(cronjob)).Infof("executing") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why disabled?
@@ -156,9 +163,11 @@ func (r *Runner) cmdFunc(cronjob CrontabEntry, cmdCallback func(*exec.Cmd) bool) | |||
logFields["result"] = "success" | |||
} | |||
|
|||
log.WithFields(logFields).Info("finished") | |||
// log.WithFields(logFields).Info("finished") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why disabled?
I think the separate line |
If you mix the start and finish separately in the logs. Then we get a lot of garbage messages and we will have to compare by PID where exactly this team started and where exactly it finished, and the debug message to which start it belongs. |
No description provided.