ParserConfig.java 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. package cn.com.yusys.manager.config;
  2. import org.springframework.beans.factory.annotation.Value;
  3. import org.springframework.stereotype.Component;
  4. /**
  5. * 解析服务配置常量
  6. */
  7. @Component
  8. public class ParserConfig {
  9. // 心跳超时阈值(毫秒)
  10. @Value("${parser.monitor.heartbeat-timeout}")
  11. public long HEARTBEAT_TIMEOUT;
  12. // 最小活跃实例数
  13. @Value("${parser.monitor.min-active-instance}")
  14. public int MIN_ACTIVE_INSTANCE;
  15. // 最大活跃实例数
  16. @Value("${parser.monitor.max-active-instance}")
  17. public int MAX_ACTIVE_INSTANCE;
  18. // 任务积压阈值
  19. @Value("${parser.monitor.task-backlog-threshold}")
  20. public int TASK_BACKLOG_THRESHOLD;
  21. // 状态接口调用超时(毫秒)
  22. @Value("${parser.monitor.status-query-timeout}")
  23. public int STATUS_QUERY_TIMEOUT;
  24. // 状态接口连续失败次数阈值
  25. @Value("${parser.monitor.status-query-fail-count}")
  26. public int STATUS_QUERY_FAIL_COUNT;
  27. // Python实例状态接口路径
  28. public static final String STATUS_API = "/status";
  29. // GPU负载阈值(百分比)
  30. @Value("${parser.monitor.gpu-load-threshold}")
  31. public double GPU_LOAD_THRESHOLD;
  32. // GPU负载扩容实例数
  33. @Value("${parser.monitor.gpu-scale-instance-num}")
  34. public int GPU_SCALE_INSTANCE_NUM;
  35. }