diff --git a/lib/cuckoo/core/scheduler.py b/lib/cuckoo/core/scheduler.py index 358e716b9aa..a98636ad7e4 100644 --- a/lib/cuckoo/core/scheduler.py +++ b/lib/cuckoo/core/scheduler.py @@ -425,7 +425,8 @@ def build_options(self): def category_checks(self): if self.task.category in ("file", "pcap", "static"): sha256 = File(self.task.target).get_sha256() - # Check whether the file has been changed for some unknown reason. + # Check whethe + # r the file has been changed for some unknown reason. # And fail this analysis if it has been modified. if not self.check_file(sha256): log.debug("check file") @@ -1065,11 +1066,6 @@ def start(self): for task in self.db.list_tasks( status=TASK_PENDING, order_by=(Task.priority.desc(), Task.added_on), options_not_like="node=" ): - # ToDo write a proper fix/place - if self.task.category in ("file", "pcap", "static"): - self.db.set_status(task.id, TASK_COMPLETED) - continue - # Can this task ever be serviced? if not self.db.is_serviceable(task): if self.cfg.cuckoo.fail_unserviceable: @@ -1120,9 +1116,10 @@ def start(self): ): # ToDo write a proper fix/place - if self.task.category in ("file", "pcap", "static"): - self.db.set_status(task.id, TASK_COMPLETED) - continue + if task.category in ("file", "pcap", "static"): + # Dirty hack + relevant_machine_is_available = True + break # Can this task ever be serviced? if not self.db.is_serviceable(task):