gtfs 4.15.13 → 4.15.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3803,22 +3803,22 @@ var importGtfsFiles = (db, task) => mapSeries2(
3803
3803
  });
3804
3804
  let lines = [];
3805
3805
  parser.on("readable", () => {
3806
- let record;
3807
- while (record = parser.read()) {
3808
- totalLineCount += 1;
3809
- lines.push(formatGtfsLine(record, model, totalLineCount));
3810
- if (lines.length >= BATCH_SIZE) {
3811
- try {
3806
+ try {
3807
+ let record;
3808
+ while (record = parser.read()) {
3809
+ totalLineCount += 1;
3810
+ lines.push(formatGtfsLine(record, model, totalLineCount));
3811
+ if (lines.length >= BATCH_SIZE) {
3812
3812
  insertLines(lines);
3813
3813
  lines = [];
3814
- } catch (error) {
3815
- reject(error);
3814
+ task.log(
3815
+ `Importing - ${filename} - ${totalLineCount} lines imported\r`,
3816
+ true
3817
+ );
3816
3818
  }
3817
- task.log(
3818
- `Importing - ${filename} - ${totalLineCount} lines imported\r`,
3819
- true
3820
- );
3821
3819
  }
3820
+ } catch (error) {
3821
+ reject(error);
3822
3822
  }
3823
3823
  });
3824
3824
  parser.on("end", () => {