Compare commits
1 Commits
f7523ae5e2
...
4de052ef0d
| Author | SHA1 | Date | |
|---|---|---|---|
| 4de052ef0d |
@@ -42,7 +42,7 @@ async function run() {
|
|||||||
// scheduled running
|
// scheduled running
|
||||||
if (interval === 0) return;
|
if (interval === 0) return;
|
||||||
logger.debug(`Starting interval (${interval}s)...`);
|
logger.debug(`Starting interval (${interval}s)...`);
|
||||||
runInterval(() => fetchAndIndex().catch(handleError), interval * 1000);
|
runInterval(fetchAndIndex, interval * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
run().catch(handleError);
|
run().catch(handleError);
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import fetch from './fetch.mjs';
|
|||||||
|
|
||||||
const formatNumber = str => str && Number(`${str}`.replace(/[^0-9.-]/, ''));
|
const formatNumber = str => str && Number(`${str}`.replace(/[^0-9.-]/, ''));
|
||||||
const formatString = str => {
|
const formatString = str => {
|
||||||
if (str == null) return 'N/A';
|
|
||||||
if (typeof str !== 'string') return str;
|
if (typeof str !== 'string') return str;
|
||||||
return str && str.length && str !== 'undefined' ? str.trim() : 'N/A';
|
return str && str.length && str !== 'undefined' ? str.trim() : 'N/A';
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user