Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

Check asyncUpload.maxPendingUploadMB only if enabled #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export function startServer(s3: AWS.S3, config: Config, onDoneInitializing: () =
res.statusCode = StatusCode.OK; // tell Bazel the PUT succeeded
sendResponse(req, res, size, { startTime, awsPaused });
safeUnlinkSync(pth);
} else if (pendingUploadBytes + size > config.asyncUpload.maxPendingUploadMB * 1024 * 1024) {
} else if (config.asyncUpload.enabled && pendingUploadBytes + size > config.asyncUpload.maxPendingUploadMB * 1024 * 1024) {
winston.info(`Not uploading ${s3key}, because there are already too many pending uploads`);
res.statusCode = StatusCode.OK; // tell Bazel the PUT succeeded
sendResponse(req, res, size, { startTime, awsPaused });
Expand Down