(ctx context.Context)
| 717 | } |
| 718 | |
| 719 | func (d *dependency) EntityRecycleQueue(ctx context.Context) queue.Queue { |
| 720 | d.mu.Lock() |
| 721 | defer d.mu.Unlock() |
| 722 | |
| 723 | _, reload := ctx.Value(ReloadCtx{}).(bool) |
| 724 | if d.entityRecycleQueue != nil && !reload { |
| 725 | return d.entityRecycleQueue |
| 726 | } |
| 727 | |
| 728 | if d.entityRecycleQueue != nil { |
| 729 | d.entityRecycleQueue.Shutdown() |
| 730 | } |
| 731 | |
| 732 | settings := d.SettingProvider() |
| 733 | queueSetting := settings.Queue(context.Background(), setting.QueueTypeEntityRecycle) |
| 734 | |
| 735 | d.entityRecycleQueue = queue.New(d.Logger(), d.TaskClient(), nil, d, |
| 736 | queue.WithBackoffFactor(queueSetting.BackoffFactor), |
| 737 | queue.WithMaxRetry(queueSetting.MaxRetry), |
| 738 | queue.WithBackoffMaxDuration(queueSetting.BackoffMaxDuration), |
| 739 | queue.WithRetryDelay(queueSetting.RetryDelay), |
| 740 | queue.WithWorkerCount(queueSetting.WorkerNum), |
| 741 | queue.WithName("EntityRecycleQueue"), |
| 742 | queue.WithMaxTaskExecution(queueSetting.MaxExecution), |
| 743 | queue.WithResumeTaskType(queue.EntityRecycleRoutineTaskType, queue.ExplicitEntityRecycleTaskType, queue.UploadSentinelCheckTaskType), |
| 744 | queue.WithTaskPullInterval(10*time.Second), |
| 745 | ) |
| 746 | return d.entityRecycleQueue |
| 747 | } |
| 748 | |
| 749 | func (d *dependency) SlaveQueue(ctx context.Context) queue.Queue { |
| 750 | d.mu.Lock() |
nothing calls this directly
no test coverage detected