Skip to content

Commit 94e2962

Browse files
IAGO HENRIQUEIAGO HENRIQUE
authored andcommitted
Makefile adjustments. Also added failsafe in make snapshot
1 parent 6987e37 commit 94e2962

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,6 @@ docker_deploy_gcp:
282282
@echo "make docker_deploy_gcp TAG=v1.02 ENV=PROD"
283283
make docker_deploy_build TAG=${TAG}
284284
make docker_deploy_push TAG=${TAG}
285-
make set_new_tag ENV=${ENV} TAG=${TAG}
286285

287286
docker_deploy_build:
288287
@echo "tag usada:${TAG}"

dbaas/backup/tasks.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ def make_instance_gcp_snapshot_backup(
277277
else:
278278
raise e
279279

280+
count = 0
280281
if response.status_code < 400:
281282
while code != 200:
282283
sleep(20)
@@ -287,6 +288,12 @@ def make_instance_gcp_snapshot_backup(
287288
break
288289
if snap_response.status_code >= 400:
289290
raise error
291+
if count >= 90:
292+
errormsg = "Timeout"
293+
set_backup_error(infra, snapshot, errormsg)
294+
raise Exception(errormsg)
295+
else:
296+
count += 1
290297
code = snap_response.status_code
291298

292299
snapshot.done(snap_status)

0 commit comments

Comments
 (0)