~bigbes/core-go

b7e391889df9d3ac082df1ff5a2fac290b6bf9f7 — Drew DeVault 5 years ago da1a806
Make worker logs less loud
2 files changed, 4 insertions(+), 4 deletions(-)

M email/worker.go
M webhooks/legacy.go
M email/worker.go => email/worker.go +2 -2
@@ 25,12 25,12 @@ func NewTask(m *gomail.Message) *work.Task {
		return Send(ctx, m)
	}).Retries(10).After(func(ctx context.Context, task *work.Task) {
		if task.Result() == nil {
			log.Printf("MAIL TO %s: '%s' sent after %d attempts",
			log.Printf("Mail to %s: '%s' sent after %d attempts",
				strings.Join(m.GetHeader("To"), ";"),
				strings.Join(m.GetHeader("Subject"), ";"),
				task.Attempts())
		} else {
			log.Printf("MAIL TO %s: '%s' failed after %d attempts: %v",
			log.Printf("Mail to %s: '%s' failed after %d attempts: %v",
				strings.Join(m.GetHeader("To"), ";"),
				strings.Join(m.GetHeader("Subject"), ";"),
				task.Attempts(), task.Result())

M webhooks/legacy.go => webhooks/legacy.go +2 -2
@@ 184,10 184,10 @@ func (lq *LegacyQueue) queueStage2(ctx context.Context, tx *sql.Tx,
		return deliverPayload(ctx, name, sub.URL, headers, payload, deliveryID)
	}).Retries(5).After(func(ctx context.Context, task *work.Task) {
		if task.Result() == nil {
			log.Printf("LEGACY WEBHOOK: %s: delivery complete after %d attempts",
			log.Printf("%s: delivery complete after %d attempts",
				deliveryUUID, task.Attempts())
		} else {
			log.Printf("LEGACY WEBHOOK: %s: delivery failed after %d attempts: %v",
			log.Printf("%s: delivery failed after %d attempts: %v",
				deliveryUUID, task.Attempts(), task.Result())
		}
	}), nil