close_orders.py 396 Bytes
Newer Older
Patrick's avatar
Patrick committed
1 2 3 4 5 6 7 8 9 10 11 12
# -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand, CommandError
from repanier import tasks

class Command(BaseCommand):
    args = '<none>'
    help = 'Closes now orders on due date'

    def handle(self, *args, **options):
		something_to_close = tasks.close_orders_async_now()
		if something_to_close:
			self.stdout.write('At least on order being closed')