singer-io / tap-appsflyer

A Singer.io tap for extracting data from the AppsFlyer API
GNU Affero General Public License v3.0
11 stars 40 forks source link

change while loop conditions to fix infinite loop #11

Closed nick-mccoy closed 6 years ago

nick-mccoy commented 6 years ago

The while loop for in_app_events had:

while to_datetime <= stop_datetime

which caused an infinite loop since, once the stream caught up, to_datetime was equal to stop_datetime. Since there is a limit on the requested reports, once the tap would loop until it hit that limit and then receive a 400 and error out.

This changes the loop to

while from_datetime < to_datetime