Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Add operator __lt__ to AsyncUpdateTaskAction class #154

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions openscap_daemon/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,9 @@ def __str__(self):
return "Update Task '%i' with reference_datetime='%s'" \
% (self.task_id, self.reference_datetime)

def __lt__(a, b):
return a.reference_datetime < b.reference_datetime

def schedule_tasks(self, reference_datetime=None):
"""Evaluates all currently outstanding tasks and returns.
Outstanding task means it's not_before is lower than reference_datetime,
Expand Down