OpenSight / janus-cloud

a cluster solution for Janus WebRTC server, by API proxy approach
GNU Affero General Public License v3.0
207 stars 49 forks source link

JANUS_SERVER_STATUS_HWM status is not supported #37

Closed cppdev-1 closed 2 years ago

cppdev-1 commented 2 years ago

JANUS_SERVER_STATUS_HWM status can be set here

if self._hwm_threshold and ping_latency > self._hwm_threshold:
                self.set_status(JANUS_SERVER_STATUS_HWM)
            else:
                self.set_status(JANUS_SERVER_STATUS_NORMAL)

but it is not supported by the schema here

server_update_schema = Schema({
    'name': StrRe('^[\w-]{1,64}$'),
    'url': StrRe('^(ws|wss)://\S+$'),
    'status': IntVal(values=(JANUS_SERVER_STATUS_NORMAL, JANUS_SERVER_STATUS_ABNORMAL, JANUS_SERVER_STATUS_MAINTENANCE)),
    Optional("session_timeout"): IntVal(min=0, max=86400),
    Optional("session_num"): IntVal(min=0, max=10000),
    Optional("handle_num"): IntVal(min=0, max=100000),
    Optional("location"): StrVal(min_len=0, max_len=64),
    Optional("isp"): StrVal(min_len=0, max_len=64),
    Optional("expire"): IntVal(min=0, max=86400),
    Optional("start_time"): FloatVal(),
    AutoDel(str): object  # for all other key we must delete
})
jamken commented 2 years ago

Yes, this is mistaken

cppdev-1 commented 2 years ago

I'm closing the issue because it was fixed.