Skip to content

Commit

Permalink
Ignore url attachments in files health check (#7003)
Browse files Browse the repository at this point in the history
  • Loading branch information
fnocetti authored Jul 26, 2024
1 parent 9d70f3b commit 606aa4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/filesHealthCheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function print(content: any, error?: 'error') {
process[error ? 'stderr' : 'stdout'].write(`${LINE_PREFIX}${JSON.stringify(content)}\n`);
}

type FileRecord = { type: string; filename: string };
type FileRecord = { type: string; filename: string; url?: string };

function filterFilesInStorage(files: string[]) {
return files.filter(file => !file.endsWith('activity.log'));
Expand All @@ -53,7 +53,7 @@ async function handleTenant(tenantName: string) {
storage.getPath(file.filename, file.type)
);

if (!existsInStorage) {
if (!existsInStorage && !(file.type === 'attachment' && file.url)) {
missingInStorage += 1;
print(
{
Expand Down

0 comments on commit 606aa4e

Please sign in to comment.