fix: poller functions have to return promises
This commit is contained in:
parent
6f1b0c6e5f
commit
c53c479735
2 changed files with 3 additions and 3 deletions
|
|
@ -152,7 +152,7 @@ const cleanOldFailedPDF417Scans = () => {
|
|||
/* NOTE: Small caveat to mtime: last time the file was written to. */
|
||||
const isOld = filestat => filestat.mtimeMs < old
|
||||
|
||||
readdirRec(path.join(OPERATOR_DATA_DIR, 'id-operator'))
|
||||
return readdirRec(path.join(OPERATOR_DATA_DIR, 'id-operator'))
|
||||
.then(entries => Promise.all(
|
||||
entries
|
||||
.filter(entry => entry.isFile() && isPDF417Scan(entry))
|
||||
|
|
@ -178,7 +178,7 @@ const cleanOldFailedQRScans = () => {
|
|||
return then < old
|
||||
}
|
||||
|
||||
readdirRec(path.join(OPERATOR_DATA_DIR, 'failedQRScans'))
|
||||
return readdirRec(path.join(OPERATOR_DATA_DIR, 'failedQRScans'))
|
||||
.then(entries => Promise.all(
|
||||
entries
|
||||
.filter(entry => entry.isFile() && isOld(entry.path))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue