Skip to content

Commit

Permalink
Fix: Health lambas still fail occasionally (#6097)
Browse files Browse the repository at this point in the history
  • Loading branch information
achave11-ucsc committed Jun 11, 2024
1 parent 6a6ea97 commit 63b8a78
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lambdas/indexer/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ def health_by_key(keys: Optional[str] = None):
return app.health_controller.custom_health(keys)


@app.metric_alarm(metric=LambdaMetric.errors,
threshold=1,
period=24 * 60 * 60)
@app.metric_alarm(metric=LambdaMetric.throttles)
@app.retry(num_retries=0)
# FIXME: Remove redundant prefix from name
# https://github.com/DataBiosphere/azul/issues/5337
Expand Down
5 changes: 5 additions & 0 deletions lambdas/service/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
from azul.chalice import (
AzulChaliceApp,
C,
LambdaMetric,
)
from azul.collections import (
OrderedSet,
Expand Down Expand Up @@ -559,6 +560,10 @@ def custom_health(keys: Optional[str] = None):
return app.health_controller.custom_health(keys)


@app.metric_alarm(metric=LambdaMetric.errors,
threshold=1,
period=24 * 60 * 60)
@app.metric_alarm(metric=LambdaMetric.throttles)
@app.retry(num_retries=0)
# FIXME: Remove redundant prefix from name
# https://github.com/DataBiosphere/azul/issues/5337
Expand Down

0 comments on commit 63b8a78

Please sign in to comment.