[sysadmin-bin] Make the two queries a list
- From: Andrea Veri <av src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] Make the two queries a list
- Date: Sat, 3 May 2014 17:45:57 +0000 (UTC)
commit 3d7b88b5f890090f68ffabffd5292ce400d8da1f
Author: Andrea Veri <av gnome org>
Date: Sat May 3 19:45:50 2014 +0200
Make the two queries a list
membership/foundation-db-operations.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/membership/foundation-db-operations.py b/membership/foundation-db-operations.py
index e6253bc..8346378 100755
--- a/membership/foundation-db-operations.py
+++ b/membership/foundation-db-operations.py
@@ -220,7 +220,11 @@ def subscribe_new_members():
if socket.gethostname() != 'restaurant.gnome.org':
sys.exit("This function should only be used on restaurant.gnome.org")
- new_members = query_database_with("SELECT email from foundationmembers WHERE
TO_DAYS(last_renewed_on)=To_DAYS(NOW()); SELECT email from foundationmembers WHERE
TO_DAYS(first_added)=To_DAYS(NOW())")
+ queries = ["SELECT email from foundationmembers WHERE TO_DAYS(last_renewed_on)=To_DAYS(NOW());",
+ "SELECT email from foundationmembers WHERE TO_DAYS(first_added)=To_DAYS(NOW());"]
+
+ for query in queries:
+ new_members = query_database_with(query)
f = open('/tmp/new_subscribers', 'w')
@@ -235,5 +239,6 @@ def subscribe_new_members():
subscribe.wait()
os.remove('/tmp/new_subscribers')
+
if __name__ == "__main__":
main()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]