mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine code, add comments for ossrs.net monitor.
This commit is contained in:
parent
b703bb0fb5
commit
33bc8755ab
2 changed files with 6 additions and 1 deletions
|
@ -6,8 +6,13 @@ max_connections 1000;
|
||||||
heartbeat {
|
heartbeat {
|
||||||
enabled on;
|
enabled on;
|
||||||
interval 9.3;
|
interval 9.3;
|
||||||
|
# for python api-server
|
||||||
url http://127.0.0.1:8085/api/v1/servers;
|
url http://127.0.0.1:8085/api/v1/servers;
|
||||||
device_id "my-srs-device";
|
device_id "my-srs-device";
|
||||||
|
# for ossrs.net monitor, device_id is the key genereated by bsm.
|
||||||
|
#url http://www.ossrs.net:1977/api/v1/robots/servers;
|
||||||
|
#device_id "35c9b402c12a7246868752e2878f7e0e";
|
||||||
|
# with detail summaries
|
||||||
summaries on;
|
summaries on;
|
||||||
}
|
}
|
||||||
stats {
|
stats {
|
||||||
|
|
|
@ -682,7 +682,7 @@ int SrsServer::do_cycle()
|
||||||
// the deamon thread, update the time cache
|
// the deamon thread, update the time cache
|
||||||
while (true) {
|
while (true) {
|
||||||
// the interval in config.
|
// the interval in config.
|
||||||
int heartbeat_max_resolution = (int)(_srs_config->get_heartbeat_interval() / 100);
|
int heartbeat_max_resolution = (int)(_srs_config->get_heartbeat_interval() / SRS_SYS_CYCLE_INTERVAL);
|
||||||
|
|
||||||
// dynamic fetch the max.
|
// dynamic fetch the max.
|
||||||
int __max = max;
|
int __max = max;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue