2025-11-24 18:44:06 +08:00
|
|
|
package events
|
|
|
|
|
|
2025-12-03 15:04:48 +08:00
|
|
|
import (
|
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
|
"github.com/hibiken/asynq"
|
|
|
|
|
)
|
2025-11-24 18:44:06 +08:00
|
|
|
|
|
|
|
|
const FlushGateway = "gateway:flush"
|
|
|
|
|
|
2025-12-03 15:04:48 +08:00
|
|
|
func NewFlushGateway(ttl time.Duration) *asynq.Task {
|
|
|
|
|
return asynq.NewTask(FlushGateway, nil, asynq.MaxRetry(0), asynq.Unique(ttl))
|
2025-11-24 18:44:06 +08:00
|
|
|
}
|