Skip to content

Commit

Permalink
feat(slb-489): remove obsolete debug command
Browse files Browse the repository at this point in the history
  • Loading branch information
dspachos committed Oct 30, 2024
1 parent 8e100c1 commit 7e1d3ab
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public function __construct(
* or NULL if the API response does not contain the expected data.
*
* @throws \Exception
*
* @todo
* Implement a fallback mechanism to return default ALT text in case of API failure.
*/
Expand All @@ -71,7 +72,6 @@ public function generateImageAlt(FileInterface $image, string $langcode) {

if ($this->configFactory->get('silverback_image_ai.settings')->get('debug_mode')) {
\Drupal::logger('debug')->debug('<pre>' . print_r($response_body, TRUE) . "</pre>");
$this->loggerFactory->get('silverback_ai')->error($e->getMessage());
}

$prefix = $this->configFactory->get('silverback_image_ai.settings')->get('alt_prefix') ?: '';
Expand Down Expand Up @@ -109,6 +109,7 @@ public function generateImageAlt(FileInterface $image, string $langcode) {
*
* @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*
* @todo
* Extract the image processing logic to a separate method for improved
* code maintainability and readability.
Expand Down Expand Up @@ -208,6 +209,7 @@ public function sendOpenAiRequest(string $base_64_data, string $langcode) {
*
* @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*
* @todo Create a db table to store data, query can be slow for large number of entities.
*/
public function getMissingAltEntitiesCount() {
Expand Down Expand Up @@ -314,6 +316,7 @@ public function getMediaImagesTotalCount() {
* An array of arrays, each containing:
* - entity: The media entity translation.
* - langcode: The language code of the translation.
*
* @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Expand Down Expand Up @@ -345,6 +348,7 @@ public function getMediaEntitiesToUpdateAll() {
* An array of arrays, each containing:
* - entity: The media entity translation.
* - langcode: The language code of the translation.
*
* @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
Expand Down

0 comments on commit 7e1d3ab

Please sign in to comment.