aboutsummaryrefslogtreecommitdiff
path: root/src/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.py')
-rw-r--r--src/main.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.py b/src/main.py
index c2855c1..0d63190 100644
--- a/src/main.py
+++ b/src/main.py
@@ -4,7 +4,7 @@ import math
from slack_bolt.app.async_app import AsyncApp
from slack_bolt.adapter.socket_mode.async_handler import AsyncSocketModeHandler
from dotenv import load_dotenv
-from .db import init_db, get_user, add_vote, get_vote_counts, get_user_vote, get_deployment, update_deployment_status
+from .db import init_db, get_user, add_vote, get_vote_counts, get_user_vote, get_deployment, update_deployment_status, get_active_users
from .utils import generate_voting_blocks
from .auth import app as fastapi_app
from .botnet import deploy_message, execute_deployment
@@ -100,7 +100,9 @@ async def handle_vote(ack, respond, logger, context, body, client):
active_users = await get_active_users()
total_members = len(active_users)
- THRESHOLD = math.ceil(max(3, min(15, int(total_members * 0.2)))) # min 3, max 15 - use 20% total members
+ # THRESHOLD = math.ceil(max(3, min(15, int(total_members * 0.2)))) # min 3, max 15 - use 20% total members
+ THRESHOLD = 2 # Debug hardcoded
+ print(f"DEBUG: Threshold is {THRESHOLD}")
if approve_count >= THRESHOLD:
await update_deployment_status(deployment_id, "approved")