mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-20 11:03:40 +00:00
Merge pull request #22019 from overleaf/jpa-cleanup
[history-v1] back_fill_file_hash: cleanup BUFFER_DIR when done GitOrigin-RevId: 6413292bbe8cca470919b740d7e2b45fc5e7d824
This commit is contained in:
parent
71112d2fdc
commit
44e0428496
2 changed files with 11 additions and 0 deletions
|
@ -1101,6 +1101,13 @@ try {
|
|||
await main()
|
||||
} finally {
|
||||
printStats()
|
||||
try {
|
||||
// Perform non-recursive removal of the BUFFER_DIR. Individual files
|
||||
// should get removed in parallel as part of batch processing.
|
||||
await fs.promises.rmdir(BUFFER_DIR)
|
||||
} catch (err) {
|
||||
console.error(`cleanup of BUFFER_DIR=${BUFFER_DIR} failed`, err)
|
||||
}
|
||||
}
|
||||
|
||||
let code = 0
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import fs from 'node:fs'
|
||||
import Crypto from 'node:crypto'
|
||||
import Stream from 'node:stream'
|
||||
import { setTimeout } from 'node:timers/promises'
|
||||
|
@ -511,6 +512,9 @@ describe('back_fill_file_hash script', function () {
|
|||
}
|
||||
result = { stdout, stderr, status: code }
|
||||
}
|
||||
expect((await fs.promises.readdir('/tmp')).join(';')).to.not.match(
|
||||
/back_fill_file_hash/
|
||||
)
|
||||
const extraStatsKeys = [
|
||||
'eventLoop',
|
||||
'readFromGCSThroughputMiBPerSecond',
|
||||
|
|
Loading…
Add table
Reference in a new issue