Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Commit

Permalink
chore: drivefileのcompletedを一定以上で消すように
Browse files Browse the repository at this point in the history
  • Loading branch information
yupix committed Sep 29, 2023
1 parent 33c95d1 commit 99d4858
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/migration/drive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ export async function migrateDriveFile(
isSensitive: file.isSensitive,
isLink: file.isLink,
});

if (await driveFileQueue.getCompletedCount() > 1000) {
await driveFileQueue.clean(0, "completed");
}
logger.succ(`DriveFile: ${driveFileId} の移行が完了しました`);
return createdDriveFile;
}

Expand Down

0 comments on commit 99d4858

Please sign in to comment.