MCPcopy
hub / github.com/cortexlabs/cortex / NewBatchMessageHandler

Function NewBatchMessageHandler

pkg/dequeuer/batch_handler.go:58–73  ·  view source on GitHub ↗
(config BatchMessageHandlerConfig, awsClient *awslib.Client, statsdClient statsd.ClientInterface, log *zap.SugaredLogger)

Source from the content-addressed store, hash-verified

56}
57
58func NewBatchMessageHandler(config BatchMessageHandlerConfig, awsClient *awslib.Client, statsdClient statsd.ClientInterface, log *zap.SugaredLogger) *BatchMessageHandler {
59 tags := []string{
60 "api_name:" + config.APIName,
61 "job_id:" + config.JobID,
62 }
63
64 return &BatchMessageHandler{
65 config: config,
66 jobCompleteMessageDelay: _jobCompleteMessageDelay,
67 tags: tags,
68 aws: awsClient,
69 metrics: statsdClient,
70 log: log,
71 httpClient: &http.Client{},
72 }
73}
74
75func (h *BatchMessageHandler) Handle(message *sqs.Message) error {
76 if isOnJobCompleteMessage(message) {

Callers 3

mainFunction · 0.92

Calls

no outgoing calls