Skip to content

Commit 6384b06

Browse files
committed
fix: no expiration notifications for self schedules
closes: #598 Change-Id: Ibd2b0c8746e913de68bfaf5e9715fa7e9f556946
1 parent 650784a commit 6384b06

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/quads/tools/notify.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,8 @@ def main(_logger=None):
228228
logger.debug(str(ex))
229229
logger.error("Could not update notification: %s." % ass.notification.id)
230230

231-
if Config["email_notify"]:
232-
_days = Days.less_than(3) if ass.is_self_schedule else Days
233-
for day in _days:
231+
if Config["email_notify"] and not ass.is_self_schedule:
232+
for day in Days:
234233
future_schedules = None
235234
future = datetime.now() + timedelta(days=day.value)
236235
future_date = "%4d-%.2d-%.2dT22:00" % (
@@ -250,7 +249,7 @@ def main(_logger=None):
250249
host_list = set(current_hosts) - set(future_hosts)
251250
if host_list and future > current_schedules[0].end:
252251
if not getattr(ass.notification, day.name.lower()):
253-
logger.info("=============== Additional Message")
252+
logger.info("=============== Expiration Notification")
254253
cloud = ass.cloud.name
255254
create_message(
256255
cloud,

0 commit comments

Comments
 (0)