Description

Default Update Check

The default update check is used when an agency-specific update script is not found.

Details

Methods


<inner> defaultUpdate( agencyOptions, callback )

Description

This is the built-in default agency update check. This function is used if there is no agency-specific update script provided by the RightTrackAgency module for the agency.

• First, it performs a HEAD request on the update URL to get the server's last-modified header. It will compare this date/time to the one saved in the agency's gtfs directory in the published.txt file.

• If the published.txt file is not found or has an older date/time than the one provided in the server's last-modified header, it will download the zip file and unzip the contents into the agency's gtfs directory.

Parameters
Name Type Description
agencyOptions AgencyOptions

Agency Build Options

callback updateCallback

callback function when update is complete

Details
updateFunction