From 28dc5bf85f25f277989dce60d3a236e98609b527 Mon Sep 17 00:00:00 2001 From: Max Meinhold Date: Tue, 3 Sep 2019 19:38:58 -0400 Subject: [PATCH 1/6] Add Secretary tag Resolves #170 --- packet/ldap.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packet/ldap.py b/packet/ldap.py index 79a1abfd..4068ecd7 100644 --- a/packet/ldap.py +++ b/packet/ldap.py @@ -144,6 +144,8 @@ def ldap_get_eboard_role(member): return_val = "R&D" elif _ldap_is_member_of_group(member, "eboard-social"): return_val = "Social" + elif _ldap_is_member_of_group(member, "eboard-secretary"): + return_val = "Secretary" return return_val From b148b316b0291c3fcbffac409f7b9d0679fccdbf Mon Sep 17 00:00:00 2001 From: Max Meinhold Date: Fri, 6 Sep 2019 11:47:23 -0400 Subject: [PATCH 2/6] Include misc sigs in active packets list --- packet/templates/active_packets.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packet/templates/active_packets.html b/packet/templates/active_packets.html index ad3c9889..2be6984d 100644 --- a/packet/templates/active_packets.html +++ b/packet/templates/active_packets.html @@ -47,12 +47,12 @@

Active Packets

height="25"/> {{ get_rit_name(packet.freshman_username) }} - - {% if packet.signatures_received_result.upper == packet.signatures_required_result.upper %} + + {% if packet.signatures_received_result.member_total == packet.signatures_required_result.member_total %} 💯 {# 100% emoji #} {% else %} - {{ packet.signatures_received_result.upper }} / - {{ packet.signatures_required_result.upper }} + {{ packet.signatures_received_result.member_total }} / + {{ packet.signatures_required_result.member_total }} {% endif %} From 79bf3b27f9a29b123435390515f1986b25b6b44f Mon Sep 17 00:00:00 2001 From: Devin Matte Date: Sun, 22 Sep 2019 21:09:12 -0400 Subject: [PATCH 3/6] Slight bug fixes --- packet/commands.py | 2 +- packet/context_processors.py | 1 + wsgi.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packet/commands.py b/packet/commands.py index 5b290cfd..f1402c68 100644 --- a/packet/commands.py +++ b/packet/commands.py @@ -260,7 +260,7 @@ def extend_packet(packet_id): else: print("Ready to extend packet #{} for {}".format(packet_id, packet.freshman_username)) - packet.end = input_date("Enter the new end date for this packet") + packet.end = datetime.combine(input_date("Enter the new end date for this packet"), packet_end_time) db.session.commit() print("Packet successfully extended") diff --git a/packet/context_processors.py b/packet/context_processors.py index 8aade420..8abe02df 100644 --- a/packet/context_processors.py +++ b/packet/context_processors.py @@ -12,6 +12,7 @@ # pylint: disable=bare-except +@lru_cache(maxsize=128) def get_csh_name(username): try: member = ldap_get_member(username) diff --git a/wsgi.py b/wsgi.py index def9b386..b7ea0ab7 100644 --- a/wsgi.py +++ b/wsgi.py @@ -5,4 +5,4 @@ from packet import app if __name__ == "__main__": - app.run(host=app.config["IP"], port=int(app.config["PORT"])) + app.run(host=app.config["IP"], port=int(app.config["PORT"]), threaded=False) From 49e24dee8eb7d93016632b93afd44ad63f2b064a Mon Sep 17 00:00:00 2001 From: Devin Matte Date: Sun, 22 Sep 2019 21:13:13 -0400 Subject: [PATCH 4/6] Adding long timeout limit --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d6d22609..82e18878 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,4 +28,4 @@ RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \ RUN ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime -CMD ["gunicorn", "packet:app", "--bind=0.0.0.0:8080", "--access-logfile=-"] +CMD ["gunicorn", "packet:app", "--bind=0.0.0.0:8080", "--access-logfile=-", "--timeout=600"] From 2596c1fb6545b48b8e32ba89f3ff208d3c6d3841 Mon Sep 17 00:00:00 2001 From: Devin Matte Date: Sun, 22 Sep 2019 21:14:14 -0400 Subject: [PATCH 5/6] 3.3.2 Version Bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6cc93f51..8e362207 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "title": "CSH Packet", "name": "csh-packet", - "version": "3.3.1", + "version": "3.3.2", "description": "A web app implementation of the CSH introductory packet.", "bugs": { "url": "https://github.com/ComputerScienceHouse/packet/issues", From 7164a5c53e815e226c6ef1b9e29ac0b17e8ac21b Mon Sep 17 00:00:00 2001 From: Devin Matte Date: Sun, 22 Sep 2019 21:25:29 -0400 Subject: [PATCH 6/6] Adds back threading to wsgi --- wsgi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wsgi.py b/wsgi.py index b7ea0ab7..def9b386 100644 --- a/wsgi.py +++ b/wsgi.py @@ -5,4 +5,4 @@ from packet import app if __name__ == "__main__": - app.run(host=app.config["IP"], port=int(app.config["PORT"]), threaded=False) + app.run(host=app.config["IP"], port=int(app.config["PORT"]))