chore: pr feedbacks
This commit is contained in:
parent
94f1028da0
commit
06ba7f3948
1 changed files with 10 additions and 6 deletions
|
|
@ -15,12 +15,16 @@ export class VolumeHealthCheckJob extends Job {
|
|||
});
|
||||
|
||||
for (const volume of volumes) {
|
||||
await withContext({ organizationId: volume.organizationId }, async () => {
|
||||
const { status } = await volumeService.checkHealth(volume.shortId);
|
||||
if (status === "error" && volume.autoRemount) {
|
||||
await volumeService.mountVolume(volume.shortId);
|
||||
}
|
||||
});
|
||||
try {
|
||||
await withContext({ organizationId: volume.organizationId }, async () => {
|
||||
const { status } = await volumeService.checkHealth(volume.shortId);
|
||||
if (status === "error" && volume.autoRemount) {
|
||||
await volumeService.mountVolume(volume.shortId);
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
logger.error(`Health check failed for volume ${volume.name}:`, error);
|
||||
}
|
||||
}
|
||||
|
||||
return { done: true, timestamp: new Date() };
|
||||
|
|
|
|||
Loading…
Reference in a new issue