From 40c73e4c4f0f4f7e68017aeab1de1d50811d3599 Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Wed, 1 Jun 2016 01:13:08 +0200 Subject: [PATCH] more sleep, more debug --- shop/views.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shop/views.py b/shop/views.py index 490c0b30..ec424496 100644 --- a/shop/views.py +++ b/shop/views.py @@ -396,7 +396,11 @@ class CoinifyRedirectView(LoginRequiredMixin, EnsureUserOwnsOrderMixin, EnsureUn # this coinifyinvoice expired, delete it print "order %s has an expired coinifyapiinvoice, delete it.." % order.pk order.coinifyapiinvoice.delete() - time.sleep(2) + if hasattr(order, 'coinifyapiinvoice'): + print "deleted coinifyapiinvoice but order %s still hasattr(coinifyapiinvoice), sleeping 5 secs" % order.pk + time.sleep(5) + if hasattr(order, 'coinifyapiinvoice'): + print "deleted coinifyapiinvoice and slept 5 secs but order %s still hasattr(coinifyapiinvoice), what the fuck" % order.pk # create a new coinify invoice if needed print "checking if order %s has coinifyapiinvoice" % order.pk