mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-31 06:42:03 +00:00
feat: Implement throttling and retry logic in secure-fs module
- Added concurrency limiting using p-limit to prevent ENFILE/EMFILE errors. - Introduced retry logic with exponential backoff for transient file descriptor errors. - Enhanced secure-fs with new functions for configuring throttling and monitoring active/pending operations. - Added unit tests for throttling and retry logic to ensure reliability.
This commit is contained in:
@@ -70,8 +70,9 @@ Binary file ${relativePath} added
|
||||
return createNewFileDiff(relativePath, '040000', ['[Directory]']);
|
||||
}
|
||||
|
||||
if (stats.size > MAX_SYNTHETIC_DIFF_SIZE) {
|
||||
const sizeKB = Math.round(stats.size / 1024);
|
||||
const fileSize = Number(stats.size);
|
||||
if (fileSize > MAX_SYNTHETIC_DIFF_SIZE) {
|
||||
const sizeKB = Math.round(fileSize / 1024);
|
||||
return createNewFileDiff(relativePath, '100644', [
|
||||
`[File too large to display: ${sizeKB}KB]`,
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user