[sysadmin-bin] Grace time should start at membership expiration + 3m
- From: Andrea Veri <averi src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] Grace time should start at membership expiration + 3m
- Date: Tue, 22 Feb 2022 13:54:54 +0000 (UTC)
commit b8c37b85048065d92be3759e571c9be4242e03fb
Author: Andrea Veri <averi redhat com>
Date: Tue Feb 22 14:54:47 2022 +0100
Grace time should start at membership expiration + 3m
membership/foundation-operations.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/membership/foundation-operations.py b/membership/foundation-operations.py
index 94f6ab7..751d25d 100755
--- a/membership/foundation-operations.py
+++ b/membership/foundation-operations.py
@@ -79,6 +79,7 @@ def cleanup_mailgrace():
gracemails = glu.get_uids_from_group('mailgrace')
import dateutil.relativedelta as relativedelta
+ delta_2y = relativedelta.relativedelta(years=2)
delta_3m = relativedelta.relativedelta(months=3)
for member in gracemails:
@@ -87,7 +88,7 @@ def cleanup_mailgrace():
last_renewed_on = dt.date(int(last_renewed_on_attr.split('-')[0]),
int(last_renewed_on_attr.split('-')[1]), int(last_renewed_on_attr.split('-')[2]))
mail_attr = ldap_fields[2].decode('utf-8')
common_name_attr = ldap_fields[3].decode('utf-8')
- if today == (last_renewed_on + delta_3m):
+ if today == (last_renewed_on + delta_2y + delta_3m):
send_form_letters(alias_decomm, mail_attr, common_name_attr, last_renewed_on_attr)
glu.remove_user_from_ldap_group(member, 'mailgrace')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]