diff options
| author | Pitu <[email protected]> | 2021-01-07 17:09:56 +0900 |
|---|---|---|
| committer | Pitu <[email protected]> | 2021-01-07 17:09:56 +0900 |
| commit | 07a873c88bc52c96a27224e5c64be418ad4e7203 (patch) | |
| tree | ed8acbbd62dda31fa30d5c2cdcb40fd100801b00 /src/api | |
| parent | fix: incorrect case on colum name (diff) | |
| download | host.fuwn.me-07a873c88bc52c96a27224e5c64be418ad4e7203.tar.xz host.fuwn.me-07a873c88bc52c96a27224e5c64be418ad4e7203.zip | |
fix: terminate rehashing script when done
Diffstat (limited to 'src/api')
| -rw-r--r-- | src/api/utils/rehashDatabase.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/api/utils/rehashDatabase.js b/src/api/utils/rehashDatabase.js index 4ccb301..c8640ae 100644 --- a/src/api/utils/rehashDatabase.js +++ b/src/api/utils/rehashDatabase.js @@ -19,7 +19,7 @@ const start = async () => { let done = 0; const printProgress = () => { console.log(`PROGRESS: ${done}/${uploads.length}`); - if (done >= uploads.length) clearInterval(progressInterval); + if (done >= uploads.length) clearInterval(progressInterval); // eslint-disable-line no-use-before-define }; const progressInterval = setInterval(printProgress, 1000); printProgress(); @@ -49,6 +49,7 @@ const start = async () => { const hrend = process.hrtime(hrstart); console.log(`Done in : ${(hrend[0] + (hrend[1] / 1e9)).toFixed(4)}s`); + process.exit(0); }; start(); |