|
@@ -62,12 +62,12 @@ class PushScanThread:
|
|
|
# if abtest_params.get('agent_push_enabled', 'false').lower() != 'true':
|
|
|
# logger.debug(f"User {user_id} not enabled agent push, skipping.")
|
|
|
# continue
|
|
|
- agent = self.service.get_agent_instance(staff_id, user_id)
|
|
|
- should_initiate = agent.should_initiate_conversation()
|
|
|
user_tags = self.service.user_relation_manager.get_user_tags(user_id)
|
|
|
-
|
|
|
if configs.get_env() != 'dev' and not white_list_tags.intersection(user_tags):
|
|
|
should_initiate = False
|
|
|
+ else:
|
|
|
+ agent = self.service.get_agent_instance(staff_id, user_id)
|
|
|
+ should_initiate = agent.should_initiate_conversation()
|
|
|
if should_initiate:
|
|
|
logger.info(f"user[{user_id}], tags{user_tags}: generate a generation task for conversation initiation")
|
|
|
rmq_msg = generate_task_rmq_message(self.rmq_topic, staff_id, user_id, TaskType.GENERATE)
|