From 7ef46739c2922dbac9d3d0051f5598fc9bd8d806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= Date: Sat, 4 May 2024 23:48:59 +0100 Subject: [PATCH] chore: comparison support for scheduler task --- CHANGELOG.md | 2 +- src/appier/scheduler.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f60c07d3..200343f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -* +* Comparison support for `SchedulerTask` ## [1.33.3] - 2024-05-01 diff --git a/src/appier/scheduler.py b/src/appier/scheduler.py index 64a1f10e..232d9ad7 100644 --- a/src/appier/scheduler.py +++ b/src/appier/scheduler.py @@ -187,6 +187,14 @@ def __init__(self, job, cron): self.date = SchedulerDate.from_cron(cron) self._enabled = True + def __eq__(self, other): + if isinstance(other, self.__class__): + return True + return False + + def __lt__(self, other): + return False + def enable(self): self._enabled = True