Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into deploy/dor-aws
Browse files Browse the repository at this point in the history
  • Loading branch information
IPadawans committed Oct 9, 2023
2 parents 686109b + 31a1e07 commit ce0055f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/shared/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ const deleteSnapshotNotSyncToGL0 = async (ssmClient, event, ec2InstancesIds) =>
const finalSnapshotToRemove = initialSnapshotToRemove + 50

console.log(`Removing snapshots on data folder between: ${initialSnapshotToRemove} - ${finalSnapshotToRemove}`)

//Somehow the syntax rm data/incremental_snapshot/{x..y} doesn't work, so we put individually
const promises = []
for (let idx = initialSnapshotToRemove; idx <= finalSnapshotToRemove; idx++) {
promises.push(getRemoveInstructionByOrdinal(event, idx))
}

const deletingCommands = await Promise.all(promises)
const allDeletingCommands = deletingCommands.reduce((acc, curr) => [...acc,...curr], []);
const allDeletingCommands = deletingCommands.reduce((acc, curr) => [...acc, ...curr], []);

const commands = [
`cd ${file_system.base_metagraph_l0_directory}`,
Expand Down Expand Up @@ -204,8 +204,8 @@ const saveLogs = async (ssmClient, event, logName, layer, ec2InstancesIds) => {

await sendCommand(ssmClient, commands, ec2InstancesIds)

console.log('Waiting 30s to finish the compression...')
await sleep(30000)
console.log('Waiting 10s to finish the compression...')
await sleep(10000)
printSeparatorWithMessage('Finished')
}

Expand Down Expand Up @@ -283,7 +283,7 @@ const getUnhealthyClusters = async (event) => {
try {
const response = await axios.get(url)
const clusterInfo = response.data
if (clusterInfo.length < 3) {
if (!url.includes(ports.metagraph_l0_public_port) && clusterInfo.length < 3) {
console.log(`Less than 3: ${url}`)
unhealthyClusters.push(url)
continue
Expand Down

0 comments on commit ce0055f

Please sign in to comment.