mirror of
https://git.ptzo.gdn/feditools/relay.git
synced 2024-09-21 12:47:12 +00:00
tighter limits (#172)
Reviewed-on: https://git.ptzo.gdn/feditools/relay/pulls/172 Co-authored-by: Tyr Mactire <tyr@pettingzoo.co> Co-committed-by: Tyr Mactire <tyr@pettingzoo.co>
This commit is contained in:
parent
54fa199245
commit
1e1d15b8db
@ -15,13 +15,13 @@ func (l *Logic) MaintDeliveryErrorTimeout(ctx context.Context, jid string) error
|
||||
|
||||
today := time.Date(time.Now().UTC().Year(), time.Now().UTC().Month(), time.Now().UTC().Day(), 0, 0, 0, 0, time.UTC)
|
||||
|
||||
deliverErrors, err := l.MetricsGetAllDeliverErrorWeek(ctx, 8)
|
||||
deliverErrors, err := l.MetricsGetAllDeliverErrorWeek(ctx, 2)
|
||||
if err != nil {
|
||||
log.Errorf("metrics get errors: %s", err.Error())
|
||||
|
||||
return nil // always return nil, this job is scheduled
|
||||
}
|
||||
deliverSuccesses, err := l.MetricsGetAllDeliverSuccessWeek(ctx, 8)
|
||||
deliverSuccesses, err := l.MetricsGetAllDeliverSuccessWeek(ctx, 2)
|
||||
if err != nil {
|
||||
log.Errorf("metrics get successes: %s", err.Error())
|
||||
|
||||
|
@ -12,8 +12,11 @@ import (
|
||||
)
|
||||
|
||||
func (r *Runner) EnqueueDeliverActivity(_ context.Context, instanceID int64, activity fedihelper.Activity) error {
|
||||
retry := 8
|
||||
|
||||
job := faktory.NewJob(JobDeliverActivity, strconv.FormatInt(instanceID, 10), activity)
|
||||
job.Queue = QueueDelivery
|
||||
job.Retry = &retry
|
||||
|
||||
return r.manager.Pool.With(func(conn *faktory.Client) error {
|
||||
return conn.Push(job)
|
||||
|
Loading…
Reference in New Issue
Block a user