Skip to content

Commit

Permalink
Merge pull request #137 from linkedconnections/development
Browse files Browse the repository at this point in the history
v2.1.4
  • Loading branch information
julianrojas87 authored Jul 8, 2022
2 parents 82c5ec7 + 1c617ca commit 4f5f2a4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
14 changes: 8 additions & 6 deletions lib/stoptimes/StopTimes2Cxs.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,20 @@ module.exports = function (sourcePath, outPath, stores, fresh) {
printedRows++;
});

connectionRules.on('end', () => {
connectionRules.on('end', async () => {
for (let i in connectionsPool) {
connectionsPool[i].end();
}

// Close all LevelDB stores as they will not be used any further on this process
if (!(stores.stopsDB instanceof Map)) {
stores.stopsDB.close();
stores.tripsDB.close();
stores.routesDB.close();
stores.servicesDB.close();
historyDB.close();
await Promise.all([
stores.stopsDB.close(),
stores.tripsDB.close(),
stores.routesDB.close(),
stores.servicesDB.close(),
historyDB.close()
]);
}

console.error(`Created ${printedRows} Connection rules in ${new Date() - t0} ms`);
Expand Down
6 changes: 1 addition & 5 deletions lib/stoptimes/st2c.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,7 @@
// Update history with new found service dates
const update = Object.assign({}, old);
newServices.forEach(nsd => {
update[nsd] = {
type: 'Connection',
departureDelay: 0,
arrivalDelay: 0
}
update[nsd] = { type: 'Connection' };
});

await this.historyDB.put(id, update);
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gtfs2lc",
"version": "2.1.3",
"version": "2.1.4",
"description": "Mapping script from gtfs to (linked) connections",
"main": "lib/gtfs2lc.js",
"bin": {
Expand Down

0 comments on commit 4f5f2a4

Please sign in to comment.