@@ -750,6 +750,8 @@ const pushResources = async () => {
750
750
};
751
751
752
752
const pushSettings = async () => {
753
+ checkDeployConditions(localConfig);
754
+
753
755
try {
754
756
log("Pushing project settings ...");
755
757
@@ -810,8 +812,6 @@ const pushSettings = async () => {
810
812
}
811
813
812
814
const pushFunction = async ({ functionId, async, returnOnZero } = { returnOnZero: false }) => {
813
- let response = {};
814
-
815
815
const functionIds = [];
816
816
817
817
if (functionId) {
@@ -865,14 +865,15 @@ const pushFunction = async ({ functionId, async, returnOnZero } = { returnOnZero
865
865
const failedDeployments = [];
866
866
867
867
await Promise.all(functions.map(async (func) => {
868
+ let response = {};
869
+
868
870
const ignore = func.ignore ? 'appwrite.json' : '.gitignore';
869
871
let functionExists = false;
870
872
let deploymentCreated = false;
871
873
872
874
const updaterRow = new Spinner({ status: '', resource: func.name, id: func['$id'], end: `Ignoring using: ${ignore}` });
873
875
874
876
updaterRow.update({ status: 'Getting' }).startSpinner(SPINNER_DOTS);
875
-
876
877
try {
877
878
response = await functionsGet({
878
879
functionId: func['$id'],
@@ -974,11 +975,6 @@ const pushFunction = async ({ functionId, async, returnOnZero } = { returnOnZero
974
975
let pollChecks = 0;
975
976
976
977
while (true) {
977
- if (pollChecks >= POLL_MAX_DEBOUNCE) {
978
- updaterRow.update({ end: 'Deployment is taking too long. Please check the console for more details.' })
979
- break;
980
- }
981
-
982
978
response = await functionsGetDeployment({
983
979
functionId: func['$id'],
984
980
deploymentId: deploymentId,
@@ -1017,7 +1013,7 @@ const pushFunction = async ({ functionId, async, returnOnZero } = { returnOnZero
1017
1013
}
1018
1014
1019
1015
pollChecks++;
1020
- await new Promise(resolve => setTimeout(resolve, POLL_DEBOUNCE));
1016
+ await new Promise(resolve => setTimeout(resolve, POLL_DEBOUNCE * 1.5 ));
1021
1017
}
1022
1018
} catch (e) {
1023
1019
updaterRow.fail({ errorMessage: e.message ?? 'Unknown error occurred. Please try again' })
@@ -1031,7 +1027,7 @@ const pushFunction = async ({ functionId, async, returnOnZero } = { returnOnZero
1031
1027
1032
1028
failedDeployments.forEach((failed) => {
1033
1029
const { name, deployment, $id } = failed;
1034
- const failUrl = `${globalConfig.getEndpoint().replace('/v1', '' )}/console/project-${localConfig.getProject().projectId}/functions/function-${$id}/deployment-${deployment}`;
1030
+ const failUrl = `${globalConfig.getEndpoint().slice(0, -3 )}/console/project-${localConfig.getProject().projectId}/functions/function-${$id}/deployment-${deployment}`;
1035
1031
1036
1032
error(`Deployment of ${name} has failed. Check at ${failUrl} for more details\n`);
1037
1033
});
0 commit comments