コード例 #1
0
    def handle(self, *args, **options):

        if debug == False:
            try:
                check_draft_clocks()
                self.stdout.write(self.style.SUCCESS('Successfully ran script'))
            except:
                target_email = '*****@*****.**'
                subject_line = '[Script Failed]'
                email_body = 'The draft fives script failed.'
                send_mail(subject_line,
                          email_body,
                          '',
                          [target_email],
                          fail_silently=False)
        else:
            check_draft_clocks()
            self.stdout.write(self.style.SUCCESS('Successfully ran script'))
コード例 #2
0
    def handle(self, *args, **options):

        if debug == False:
            try:
                check_draft_clocks()
                auction_end_routine()
                periodic_alerts_routine()
                commish_pending_transactions_routine()
                check_expired_trades()
                check_expired_set_contracts()
                self.stdout.write(self.style.SUCCESS("Successfully ran script"))
            except:
                target_email = "*****@*****.**"
                subject_line = "[Script Failed]"
                email_body = "The auction end script failed."
                send_mail(subject_line, email_body, "", [target_email], fail_silently=False)
        else:
            check_draft_clocks()
            auction_end_routine()
            periodic_alerts_routine()
            commish_pending_transactions_routine()
            check_expired_trades()
            check_expired_set_contracts()
            self.stdout.write(self.style.SUCCESS("Successfully ran script"))