This function tries to fix critical events originating from the queue submission system.

        Returns the number of tasks that have been fixed.

def fix_queue_critical(self):
        """
        This function tries to fix critical events originating from the queue submission system.

        Returns the number of tasks that have been fixed.
        """
        count = 0
        for task in self.iflat_tasks(status=self.S_QCRITICAL):
            logger.info("Will try to fix task %s" % str(task))
            try:
                print(task.fix_queue_critical())
                count += 1
            except FixQueueCriticalError:
                logger.info("Not able to fix task %s" % task)

        return count