TahaFawzyElshrif commited on
Commit
abe38b8
·
1 Parent(s): afbde84
Files changed (1) hide show
  1. Consumer.py +3 -2
Consumer.py CHANGED
@@ -7,7 +7,7 @@ import json
7
  from agent.agent_graph.StateTasks import ProblemState
8
  import argparse
9
  import redis
10
-
11
  argparse_model = argparse.ArgumentParser()
12
  argparse_model.add_argument("--id", type=int, default=0, help="Consumer ID")
13
 
@@ -75,7 +75,8 @@ def callback(ch, method, properties, body):
75
  print(f"MSG AT CONSUMER {consumer_id}" )
76
 
77
  # simulate processing
78
- print(f"TYPE {type(recieved_msg)}, CONTENT {recieved_msg}")
 
79
  #model_call(recieved_msg)
80
 
81
  # (put your logic here)
 
7
  from agent.agent_graph.StateTasks import ProblemState
8
  import argparse
9
  import redis
10
+ from app import decrypt_token_from_json , get_key
11
  argparse_model = argparse.ArgumentParser()
12
  argparse_model.add_argument("--id", type=int, default=0, help="Consumer ID")
13
 
 
75
  print(f"MSG AT CONSUMER {consumer_id}" )
76
 
77
  # simulate processing
78
+ token = decrypt_token_from_json(recieved_msg['ht_token_encrypted_dumped'], get_key())
79
+ print(f"TYPE {type(recieved_msg)}, CONTENT {recieved_msg} , TOKEN {token}")
80
  #model_call(recieved_msg)
81
 
82
  # (put your logic here)