debug: remove short timings

This commit is contained in:
skeris 2024-05-06 18:58:59 +03:00
parent 08fca355b6
commit 347e141474

@ -46,7 +46,7 @@ func NewNotifyer(deps NotifyerDeps) *Notifyer {
} }
func (n *Notifyer) Start(ctx context.Context) { func (n *Notifyer) Start(ctx context.Context) {
tiker := time.NewTicker(5 * time.Minute) tiker := time.NewTicker(30 * time.Minute)
defer tiker.Stop() defer tiker.Stop()
for { for {
select { select {
@ -68,7 +68,7 @@ func (n *Notifyer) notify(ctx context.Context) {
now := time.Now() now := time.Now()
for _, record := range records { for _, record := range records {
if record.SendRegistration && !record.SendNoneCreated && now.Sub(record.SendAt) >= 10*time.Minute/* 7*24*time.Hour */ { if record.SendRegistration && !record.SendNoneCreated && now.Sub(record.SendAt) >= 7*24*time.Hour {
record.SendNoneCreated = true record.SendNoneCreated = true
err = n.repo.Update(ctx, record) err = n.repo.Update(ctx, record)
if err != nil { if err != nil {
@ -99,7 +99,7 @@ func (n *Notifyer) notify(ctx context.Context) {
} }
if record.SendRegistration && !record.SendUnpublished && now.Sub(record.SendAt) >= 15*time.Minute/* 14*24*time.Hour */ { if record.SendRegistration && !record.SendUnpublished && now.Sub(record.SendAt) >= 14*24*time.Hour {
record.SendUnpublished = true record.SendUnpublished = true
err = n.repo.Update(ctx, record) err = n.repo.Update(ctx, record)
if err != nil { if err != nil {
@ -130,7 +130,7 @@ func (n *Notifyer) notify(ctx context.Context) {
} }
} }
if record.SendRegistration && !record.SendPaid && now.Sub(record.SendAt) > 20*time.Minute/* 14*24*time.Hour */ { if record.SendRegistration && !record.SendPaid && now.Sub(record.SendAt) > 14*24*time.Hour {
record.SendPaid = true record.SendPaid = true
err = n.repo.Update(ctx, record) err = n.repo.Update(ctx, record)
if err != nil { if err != nil {