File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments