Skip to content

Commit

Permalink
Remove importInProgress
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccahum committed Oct 31, 2023
1 parent 5b90dcd commit 2fb9471
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions src/bin/vip-deploy-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ const appQuery = `
isK8sResident
syncProgress { status }
primaryDomain { name }
importStatus {
dbOperationInProgress
importInProgress
}
wpSites {
nodes {
homeUrl
Expand Down Expand Up @@ -133,30 +129,6 @@ export async function gates( app, env, fileMeta ) {
`The deploy file size (${ fileSize } bytes) exceeds the limit (${ maxFileSize } bytes).`
);
}

// TODO: Add a deploy type to importStatus

if ( ! env?.importStatus ) {
await track( 'deploy_app_command_error', { error_type: 'empty-import-status' } );
exit.withError(
'Could not determine the import status for this environment. Check the app/environment and if the problem persists, contact support for assistance'
);
}
const {
importStatus: { dbOperationInProgress, importInProgress },
} = env;

if ( importInProgress ) {
await track( 'deploy_app_command_error', { error_type: 'existing-import' } );
exit.withError(
'There is already an import in progress.\n\nYou can view the status with command:\n vip import sql status'
);
}

if ( dbOperationInProgress ) {
await track( 'deploy_app_command_error', { error_type: 'existing-dbop' } );
exit.withError( 'There is already a database operation in progress. Please try again later.' );
}
}

// Command examples for the `vip deploy app` help prompt
Expand Down

0 comments on commit 2fb9471

Please sign in to comment.