debug: remove short timings
This commit is contained in:
parent
08fca355b6
commit
347e141474
@ -46,7 +46,7 @@ func NewNotifyer(deps NotifyerDeps) *Notifyer {
|
||||
}
|
||||
|
||||
func (n *Notifyer) Start(ctx context.Context) {
|
||||
tiker := time.NewTicker(5 * time.Minute)
|
||||
tiker := time.NewTicker(30 * time.Minute)
|
||||
defer tiker.Stop()
|
||||
for {
|
||||
select {
|
||||
@ -68,7 +68,7 @@ func (n *Notifyer) notify(ctx context.Context) {
|
||||
now := time.Now()
|
||||
|
||||
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
|
||||
err = n.repo.Update(ctx, record)
|
||||
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
|
||||
err = n.repo.Update(ctx, record)
|
||||
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
|
||||
err = n.repo.Update(ctx, record)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user