Fix scanning
This commit is contained in:
parent
294abffcc4
commit
c144aab56c
@ -4,7 +4,7 @@ const zlib = require('zlib');
|
|||||||
|
|
||||||
var icao;
|
var icao;
|
||||||
|
|
||||||
function asyncForEach(array, apt, features, callback) {
|
function aptForEach(array, apt, features, callback) {
|
||||||
logger('info', "AsyncForEach Len " + array.length);
|
logger('info', "AsyncForEach Len " + array.length);
|
||||||
for (let index = 0; index < array.length; index++) {
|
for (let index = 0; index < array.length; index++) {
|
||||||
try {
|
try {
|
||||||
@ -301,7 +301,7 @@ async function scanAPTIntoDB(f, features) {
|
|||||||
var fields = line.split(/[ ]+/);
|
var fields = line.split(/[ ]+/);
|
||||||
if ([1, 16, 17, 99].indexOf(Number(fields[0])) >= 0) {
|
if ([1, 16, 17, 99].indexOf(Number(fields[0])) >= 0) {
|
||||||
var apt = { icao: currentIcao, last: Number(fields[0])===99 }
|
var apt = { icao: currentIcao, last: Number(fields[0])===99 }
|
||||||
var bla = asyncForEach(currentAirport, apt, features, (line, index, apt) => {
|
var bla = aptForEach(currentAirport, apt, features, (line, index, apt) => {
|
||||||
//await waitFor(5000);
|
//await waitFor(5000);
|
||||||
try {
|
try {
|
||||||
var fields = line.split(/[ ]+/);
|
var fields = line.split(/[ ]+/);
|
||||||
|
Loading…
Reference in New Issue
Block a user