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

WFNEWS-2389 : Fix Active Wildfire count and shorten cache TTL #2071

Merged
merged 2 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,20 @@ export class ActiveFiresWidget implements AfterViewInit {
n,
{
activeBeingHeldFires,
activeBeingHeldFiresOfNote,
activeOutOfControlFires,
activeOutOfControlFiresOfNote,
activeUnderControlFires,
activeUnderControlFiresOfNote,
},
) =>
n +
activeBeingHeldFires +
activeBeingHeldFiresOfNote +
activeOutOfControlFires +
activeUnderControlFires,
activeOutOfControlFiresOfNote +
activeUnderControlFires +
activeUnderControlFiresOfNote,
0,
) || 0;
const previousYearActive =
Expand All @@ -74,16 +80,23 @@ export class ActiveFiresWidget implements AfterViewInit {
n,
{
activeBeingHeldFires,
activeBeingHeldFiresOfNote,
activeOutOfControlFires,
activeOutOfControlFiresOfNote,
activeUnderControlFires,
activeUnderControlFiresOfNote,
},
) =>
n +
activeBeingHeldFires +
activeBeingHeldFiresOfNote +
activeOutOfControlFires +
activeUnderControlFires,
activeOutOfControlFiresOfNote +
activeUnderControlFires +
activeUnderControlFiresOfNote,
0,
) || 0;

const currentYearActiveFoN =
stats.reduce(
(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,20 @@ export class SummaryWidget implements AfterViewInit {
n,
{
activeBeingHeldFires,
activeBeingHeldFiresOfNote,
activeOutOfControlFires,
activeOutOfControlFiresOfNote,
activeUnderControlFires,
activeUnderControlFiresOfNote,
},
) =>
n +
activeBeingHeldFires +
activeBeingHeldFiresOfNote +
activeOutOfControlFires +
activeUnderControlFires,
activeOutOfControlFiresOfNote +
activeUnderControlFires +
activeUnderControlFiresOfNote,
0,
) || 0;
const previousYearActive =
Expand All @@ -49,14 +55,20 @@ export class SummaryWidget implements AfterViewInit {
n,
{
activeBeingHeldFires,
activeBeingHeldFiresOfNote,
activeOutOfControlFires,
activeOutOfControlFiresOfNote,
activeUnderControlFires,
activeUnderControlFiresOfNote,
},
) =>
n +
activeBeingHeldFires +
activeBeingHeldFiresOfNote +
activeOutOfControlFires +
activeUnderControlFires,
activeOutOfControlFiresOfNote +
activeUnderControlFires +
activeUnderControlFiresOfNote,
0,
) || 0;

Expand Down
8 changes: 4 additions & 4 deletions terraform/cloudfront.tf
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,8 @@ resource "aws_cloudfront_distribution" "wfnews_geofencing_nginx" {
viewer_protocol_policy = "redirect-to-https"

min_ttl = 3600
default_ttl = 43200
max_ttl = 86400
default_ttl = 3600
max_ttl = 43200

forwarded_values {
query_string = true
Expand Down Expand Up @@ -561,8 +561,8 @@ resource "aws_cloudfront_distribution" "wfnews_geofencing_gov_api" {
viewer_protocol_policy = "redirect-to-https"

min_ttl = 3600
default_ttl = 43200
max_ttl = 86400
default_ttl = 3600
max_ttl = 43200

forwarded_values {
query_string = true
Expand Down
Loading