[sysadmin-bin] Send a membership expiration reminder 1 month before the actual expiration
- From: Andrea Veri <averi src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] Send a membership expiration reminder 1 month before the actual expiration
- Date: Mon, 3 Jun 2019 11:12:53 +0000 (UTC)
commit 02600a3c6f20d3a775f54b43ad0b5038c875d143
Author: Andrea Veri <averi redhat com>
Date: Mon Jun 3 13:12:43 2019 +0200
Send a membership expiration reminder 1 month before the actual expiration
membership/foundation-operations.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/membership/foundation-operations.py b/membership/foundation-operations.py
index dfeef8d..2301224 100755
--- a/membership/foundation-operations.py
+++ b/membership/foundation-operations.py
@@ -81,7 +81,7 @@ def sync_foundation_with_mailusers():
def remove_expired_memberships_from_foundation():
import dateutil.relativedelta as relativedelta
delta_2y = relativedelta.relativedelta(years=2)
- delta_21d = relativedelta.relativedelta(days=21)
+ delta_1m = relativedelta.relativedelta(months=1)
members_list = ''
for member in foundationmembers:
@@ -92,7 +92,7 @@ def remove_expired_memberships_from_foundation():
mail_attr = ldap_fields[2]
common_name_attr = ldap_fields[3]
- if today == (last_renewed_on + delta_2y - delta_21d):
+ if today == (last_renewed_on + delta_2y - delta_1m):
send_form_letters(close_to_expire_membership_form_letter, mail_attr, common_name_attr,
last_renewed_on_attr)
elif (today - delta_2y) == last_renewed_on:
print "Removing %s from the foundation LDAP group as the membership expired on %s" % (member,
last_renewed_on_attr)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]