Added suport for statics and default reflector to sql routines
This commit is contained in:
parent
769aef3e6f
commit
785f86b93b
@ -55,8 +55,8 @@ class useMYSQL:
|
|||||||
logger.info('(MYSQL) error, problem with cursor execute')
|
logger.info('(MYSQL) error, problem with cursor execute')
|
||||||
raise Exception('Problem with cursor execute')
|
raise Exception('Problem with cursor execute')
|
||||||
|
|
||||||
for (callsign, mode, enabled, _repeat, max_peers, export_ambe, ip, port, passphrase, group_hangtime, use_acl, reg_acl, sub_acl, tgid_ts1_acl, tgid_ts2_acl, default_ua_timer, single_mode, voice_ident) in _cursor:
|
for (callsign, mode, enabled, _repeat, max_peers, export_ambe, ip, port, passphrase, group_hangtime, use_acl, reg_acl, sub_acl, tgid_ts1_acl, tgid_ts2_acl, default_ua_timer, single_mode, voice_ident,ts1_static,ts2_static,default_reflector) in _cursor:
|
||||||
|
try:
|
||||||
CONFIG['SYSTEMS'].update({callsign: {
|
CONFIG['SYSTEMS'].update({callsign: {
|
||||||
'MODE': mode,
|
'MODE': mode,
|
||||||
'ENABLED': bool(enabled),
|
'ENABLED': bool(enabled),
|
||||||
@ -73,9 +73,14 @@ class useMYSQL:
|
|||||||
'TG2_ACL': tgid_ts2_acl,
|
'TG2_ACL': tgid_ts2_acl,
|
||||||
'DEFAULT_UA_TIMER': int(default_ua_timer),
|
'DEFAULT_UA_TIMER': int(default_ua_timer),
|
||||||
'SINGLE_MODE': bool(single_mode),
|
'SINGLE_MODE': bool(single_mode),
|
||||||
'VOICE_IDENT': bool(voice_ident)
|
'VOICE_IDENT': bool(voice_ident),
|
||||||
|
'TS1_STATIC': ts1_static,
|
||||||
|
'TS2_STATIC': ts2_static,
|
||||||
|
'DEFAULT_REFLECTOR': int(default_reflector)
|
||||||
}})
|
}})
|
||||||
CONFIG['SYSTEMS'][callsign].update({'PEERS': {}})
|
CONFIG['SYSTEMS'][callsign].update({'PEERS': {}})
|
||||||
|
except TypeError:
|
||||||
|
logger.info('(MYSQL) Problem with data from MySQL - TypeError, carrying on to next row')
|
||||||
|
|
||||||
return(CONFIG['SYSTEMS'])
|
return(CONFIG['SYSTEMS'])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user