示例#1
0
def import_forcerun(request, iid):
        try:
            imp = Importation.objects.filter(status='WA').\
                order_by('datecreate')[0]
        except:
            return

        # try:
        imp.log.debug("Test")
        imp.save()
        filterclass = ifilter(imp)
        if filterclass:
            impf = filterclass(imp)
            if impf.check():
                impf.process()
        # imp.status = 'OK'
        imp.save()
        return HttpResponse("DONE, see logs")
示例#2
0
    def handle_noargs(self, *args, **options):
        """Processes importation.
        """
        try:
            imp = Importation.objects.filter(status='WA').\
                order_by('datecreate')[0]
        except:
            return

        # try:
        imp.log.debug("Test")
        imp.save()
        filterclass = ifilter(imp)
        if filterclass:
            impf = filterclass(imp)
            if impf.check():
                impf.process()
        # imp.status = 'OK'
        imp.save()