Skip to content

Commit

Permalink
Update scheduler.py
Browse files Browse the repository at this point in the history
  • Loading branch information
doomedraven committed Apr 18, 2024
1 parent a60696f commit 8ecbf33
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions lib/cuckoo/core/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 8ecbf33

Please sign in to comment.