chore: 并入 iotlcm-admin-svr 历史到 admin-svr/(原提交 49818c6)
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package outbound
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/cmd/inithttp"
|
||||
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/library/rabbitmq"
|
||||
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
func init() {
|
||||
inithttp.RegisterHttpInitFunc("outboundBatchQueue", func(ctx context.Context) error {
|
||||
if !rabbitmq.Enabled(ctx) {
|
||||
g.Log().Warning(ctx, "outbound batch queue is disabled because RabbitMQ is not configured")
|
||||
return nil
|
||||
}
|
||||
return ConsumeAsync(ctx)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user