Skip to content

Commit 322b004

Browse files
committed
Update CHANGELOG
1 parent 524b27f commit 322b004

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010

1111
## Version History
1212

13+
### v1.2.0
14+
15+
- :rocket: Add customizable timeout
16+
1317
### v1.1.1
1418

1519
- :rocket: Update Callsign Generation

task.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ const InputSchema = Type.Object({
1111
AgencyAcronym: Type.Optional(Type.String({
1212
description: 'Used to prefix the Callsign'
1313
})),
14+
DataTimeout: Type.Integer({
15+
description: 'Get locations updated within the last provided number of minutes',
16+
default: 5
17+
}),
1418
PartnerID: Type.String({
1519
description: 'Generated as part of API Access Flow'
1620
}),
@@ -195,7 +199,7 @@ export default class Task extends ETL {
195199
if (device.attributes.status === 'DOCKED') {
196200
// We don't care about charging devices
197201
continue;
198-
} else if (new Date(device.attributes.location.locationUpdateTimestamp).getTime() < new Date().getTime() - (30 * 60 * 1000)) {
202+
} else if (new Date(device.attributes.location.locationUpdateTimestamp).getTime() < new Date().getTime() - (env.DataTimeout * 60 * 1000)) {
199203
// We cut off devices if we haveh't seen them for 30 minutes
200204
continue;
201205
}

0 commit comments

Comments
 (0)