Merge pull request #22104 from overleaf/jpa-graceful-shutdown-abort-retries

[history-v1] back_fill_file_hash: abort retries during graceful shutdown

GitOrigin-RevId: 0d52dde32e4a7bf2293f341644b7416e669b2bdc
This commit is contained in:
Jakob Ackermann 2024-11-22 16:29:38 +01:00 committed by Copybot
parent 651fad7401
commit 1a6bd670d4

View file

@ -335,6 +335,7 @@ async function processFile(entry, filePath) {
try {
return await processFileOnce(entry, filePath)
} catch (err) {
if (gracefulShutdownInitiated) throw err
if (err instanceof NotFoundError) {
const { bucketName } = OError.getFullInfo(err)
if (bucketName === USER_FILES_BUCKET_NAME && !RETRY_FILESTORE_404) {
@ -991,6 +992,7 @@ class ProjectContext {
try {
return await backupPersistor.forProject(projectBlobsBucket, key)
} catch (err) {
if (gracefulShutdownInitiated) throw err
if (err instanceof NoKEKMatchedError) {
throw err
} else {