(config BatchMessageHandlerConfig, awsClient *awslib.Client, statsdClient statsd.ClientInterface, log *zap.SugaredLogger)
| 56 | } |
| 57 | |
| 58 | func 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 | |
| 75 | func (h *BatchMessageHandler) Handle(message *sqs.Message) error { |
| 76 | if isOnJobCompleteMessage(message) { |
no outgoing calls