winlin

refine code, add comments for ossrs.net monitor.

@@ -6,8 +6,13 @@ max_connections 1000; @@ -6,8 +6,13 @@ max_connections 1000;
6 heartbeat { 6 heartbeat {
7 enabled on; 7 enabled on;
8 interval 9.3; 8 interval 9.3;
  9 + # for python api-server
9 url http://127.0.0.1:8085/api/v1/servers; 10 url http://127.0.0.1:8085/api/v1/servers;
10 device_id "my-srs-device"; 11 device_id "my-srs-device";
  12 + # for ossrs.net monitor, device_id is the key genereated by bsm.
  13 + #url http://www.ossrs.net:1977/api/v1/robots/servers;
  14 + #device_id "35c9b402c12a7246868752e2878f7e0e";
  15 + # with detail summaries
11 summaries on; 16 summaries on;
12 } 17 }
13 stats { 18 stats {
@@ -682,7 +682,7 @@ int SrsServer::do_cycle() @@ -682,7 +682,7 @@ int SrsServer::do_cycle()
682 // the deamon thread, update the time cache 682 // the deamon thread, update the time cache
683 while (true) { 683 while (true) {
684 // the interval in config. 684 // the interval in config.
685 - int heartbeat_max_resolution = (int)(_srs_config->get_heartbeat_interval() / 100); 685 + int heartbeat_max_resolution = (int)(_srs_config->get_heartbeat_interval() / SRS_SYS_CYCLE_INTERVAL);
686 686
687 // dynamic fetch the max. 687 // dynamic fetch the max.
688 int __max = max; 688 int __max = max;