<commit_before>module "lambda_queue_watcher" {
  source = "git::https://github.com/wellcometrust/terraform.git//lambda?ref=v10.2.2"

  s3_bucket = "${var.infra_bucket}"
  s3_key    = "lambdas/monitoring/queue_watcher.zip"

  name        = "queue_watcher"
  description = "Post custom notification for queue size on all queues"
  timeout     = 30

  environment_variables = {
    PLACEHOLDER = "value"
  }

  alarm_topic_arn = "${var.lambda_error_alarm_arn}"

  log_retention_in_days = 30
}

module "trigger_post_to_slack_dlqs_not_empty" {
  source = "git::https://github.com/wellcometrust/terraform.git//lambda/trigger_cloudwatch?ref=v1.0.0"

  lambda_function_name = "${module.lambda_queue_watcher.function_name}"
  lambda_function_arn  = "${module.lambda_queue_watcher.arn}"

  cloudwatch_trigger_arn  = "${var.every_minute_arn}"
  cloudwatch_trigger_name = "${var.every_minute_name}"
}<commit_msg>post to slack trigger<commit_after>module "lambda_queue_watcher" {
  source = "git::https://github.com/wellcometrust/terraform.git//lambda?ref=v10.2.2"

  s3_bucket = "${var.infra_bucket}"
  s3_key    = "lambdas/monitoring/queue_watcher.zip"

  name        = "queue_watcher"
  description = "Post custom notification for queue size on all queues"
  timeout     = 30

  environment_variables = {
    PLACEHOLDER = "value"
  }

  alarm_topic_arn = "${var.lambda_error_alarm_arn}"

  log_retention_in_days = 30
}

module "trigger_post_to_slack_dlqs_not_empty" {
  source = "git::https://github.com/wellcometrust/terraform.git//lambda/trigger_cloudwatch?ref=v1.0.0"

  lambda_function_name = "${module.lambda_queue_watcher.function_name}"
  lambda_function_arn  = "${module.lambda_queue_watcher.arn}"

  cloudwatch_trigger_arn  = "${var.trigger_arn}"
  cloudwatch_trigger_name = "${var.trigger_name}"
}
{'fraction_non_alphanumeric': 0.12458286985539488, 'fraction_numerical': 0.014460511679644048, 'mean_word_length': 4.879084967320262, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5264562', 'n_tokens_mistral': 665, 'n_tokens_neox': 642, 'n_words': 85}