mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-22 11:46:40 +00:00
[chore] Make worker run messages debug output (#2944)
On startup and shutdown of a worker, we log a message of the worker being started together with a textual representation of a memory address. Though this can be handy for developers to debug startup/shutdown sequencing issues of the workers, it's typically not very useful or informative for an admin. We can also output a lot of these (on my system I get 265 lines of these during startup). This changes the messages from Info to Debug, to not print them under normal circumstances.
This commit is contained in:
parent
b67937c213
commit
2fd69ec58b
|
@ -181,8 +181,8 @@ func (w *Worker) run(ctx context.Context) {
|
|||
if w.Client == nil || w.Queue == nil {
|
||||
panic("not yet initialized")
|
||||
}
|
||||
log.Infof(ctx, "%p: starting worker", w)
|
||||
defer log.Infof(ctx, "%p: stopped worker", w)
|
||||
log.Debugf(ctx, "%p: starting worker", w)
|
||||
defer log.Debugf(ctx, "%p: stopped worker", w)
|
||||
util.Must(func() { w.process(ctx) })
|
||||
}
|
||||
|
||||
|
|
|
@ -114,8 +114,8 @@ func (w *FnWorker) run(ctx context.Context) {
|
|||
if w.Queue == nil {
|
||||
panic("not yet initialized")
|
||||
}
|
||||
log.Infof(ctx, "%p: starting worker", w)
|
||||
defer log.Infof(ctx, "%p: stopped worker", w)
|
||||
log.Debugf(ctx, "%p: starting worker", w)
|
||||
defer log.Debugf(ctx, "%p: stopped worker", w)
|
||||
util.Must(func() { w.process(ctx) })
|
||||
}
|
||||
|
||||
|
|
|
@ -127,8 +127,8 @@ func (w *MsgWorker[T]) run(ctx context.Context) {
|
|||
if w.Process == nil || w.Queue == nil {
|
||||
panic("not yet initialized")
|
||||
}
|
||||
log.Infof(ctx, "%p: starting worker", w)
|
||||
defer log.Infof(ctx, "%p: stopped worker", w)
|
||||
log.Debugf(ctx, "%p: starting worker", w)
|
||||
defer log.Debugf(ctx, "%p: stopped worker", w)
|
||||
util.Must(func() { w.process(ctx) })
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue