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

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Toan Quach authored and Toan Quach committed Nov 17, 2023
1 parent e043563 commit eaa7df5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/taipy/core/job/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@ def __lt__(self, other):
return self.creation_date.timestamp() < other.creation_date.timestamp()

def __le__(self, other):
return self.creation_date.timestamp() == other.creation_date.timestamp() or self < other
return self.creation_date.timestamp() <= other.creation_date.timestamp()

def __gt__(self, other):
return self.creation_date.timestamp() > other.creation_date.timestamp()

def __ge__(self, other):
return self.creation_date.timestamp() == other.creation_date.timestamp() or self > other
return self.creation_date.timestamp() >= other.creation_date.timestamp()

def __eq__(self, other):
return self.id == other.id
Expand Down
8 changes: 2 additions & 6 deletions src/taipy/core/submission/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@ def __lt__(self, other):
return self.creation_date.timestamp() < other.creation_date.timestamp()

def __le__(self, other):
return self.creation_date.timestamp() == other.creation_date.timestamp() or self < other
return self.creation_date.timestamp() <= other.creation_date.timestamp()

def __gt__(self, other):
return self.creation_date.timestamp() > other.creation_date.timestamp()

def __ge__(self, other):
return self.creation_date.timestamp() == other.creation_date.timestamp() or self > other
return self.creation_date.timestamp() >= other.creation_date.timestamp()

def _update_submission_status(self, _: Job):
abandoned = False
Expand All @@ -147,16 +147,12 @@ def _update_submission_status(self, _: Job):
canceled = True
if job.is_blocked():
blocked = True
continue
if job.is_pending() or job.is_submitted():
pending = True
continue
if job.is_running():
running = True
continue
if job.is_completed() or job.is_skipped():
completed = True
continue
if job.is_abandoned():
abandoned = True
if canceled:
Expand Down

0 comments on commit eaa7df5

Please sign in to comment.