Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VACMS-19369: Adds messaging to Slack, following established pattern #20078

Merged
merged 6 commits into from
Dec 19, 2024
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ public function onQueueItemProcessed(QueueItemProcessedEvent $event) {
// The response might have been 200 from the TIC not the Facility API.
$message = sprintf('Item %s Posted with a 200, but had an unexpected response with a size: %F phrase: %s', $item_data['uid'], $size, $response_phrase);
$this->logger->get('va_gov_post_api')->warning($message);

if ($this->moduleHandler->moduleExists('slack')) {
$slack_config = $this->config->get('slack.settings');
if ($slack_config->get('slack_webhook_url')) {
$this->slack->sendMessage(':warning: ' . $message);
}
}

// Add the item that might not have been processed back to the queue.
$this->postQueue->addToQueue($item_data);
}
Expand Down
Loading