mirror of https://github.com/Aidaho12/haproxy-wi
v8.1.8: Refactor error handling, cleanup unused variables, and fix intervals
Removed unnecessary error handling logic and unused `error_mess` variables. Adjusted HA cluster polling interval from 10 minutes to 1 minute for better responsiveness. Cleaned up redundant HTML elements and ensured consistent coding practices across files.pull/418/head
parent
c765616b1b
commit
e36050d8fd
|
@ -73,8 +73,8 @@ def delete_receiver(receiver: str, channel_id: int) -> None:
|
|||
|
||||
|
||||
def get_receiver_with_group(receiver: str, channel_id: int, group_id: int):
|
||||
try:
|
||||
model = models[receiver]
|
||||
try:
|
||||
return model.get((model.id == channel_id) & (model.group_id == group_id))
|
||||
except model.DoesNotExist:
|
||||
raise RoxywiResourceNotFound
|
||||
|
|
|
@ -8,14 +8,12 @@ from playhouse.shortcuts import model_to_dict
|
|||
import app.modules.db.cred as cred_sql
|
||||
import app.modules.db.group as group_sql
|
||||
import app.modules.db.server as server_sql
|
||||
import app.modules.common.common as common
|
||||
from app.modules.server import ssh_connection
|
||||
from app.modules.db.db_model import Cred
|
||||
import app.modules.roxywi.common as roxywi_common
|
||||
import app.modules.roxy_wi_tools as roxy_wi_tools
|
||||
from app.modules.roxywi.class_models import IdResponse, IdDataResponse, CredRequest
|
||||
|
||||
error_mess = common.error_mess
|
||||
get_config = roxy_wi_tools.GetConfigVar()
|
||||
|
||||
|
||||
|
|
|
@ -16,8 +16,6 @@ import app.modules.db.checker as checker_sql
|
|||
import app.modules.common.common as common
|
||||
import app.modules.roxywi.common as roxywi_common
|
||||
|
||||
error_mess = common.error_mess
|
||||
|
||||
|
||||
def send_message_to_rabbit(message: str, **kwargs) -> None:
|
||||
rabbit_user = sql.get_setting('rabbitmq_user')
|
||||
|
|
|
@ -184,20 +184,10 @@
|
|||
<div id="dialog-confirm" style="display: none;">
|
||||
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:3px 12px 20px 0;"></span>{{lang.phrases.are_you_sure}}</p>
|
||||
</div>
|
||||
<div id="server_creating1" style="display: none;" title="{{lang.phrases.creating_ha}}">
|
||||
<ul style="padding: 20px 20px 0px 20px;font-size: 15px;" id="server_creating_list"></ul>
|
||||
<div id="created-mess" class="alert alert-success" style="display:none;"></div>
|
||||
<div id="creating-error" class="alert alert-danger" style="display:none;"></div>
|
||||
<div id="creating-warning" class="alert alert-warning" style="display:none;"></div>
|
||||
<div id="wait-mess"></div>
|
||||
<div class="progress-bar-striped">
|
||||
<div id="creating-progress" style="width: 5%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
{% for cluster in clusters %}
|
||||
getHaCluster('{{cluster.id}}');
|
||||
setInterval(getHaCluster, 600000, '{{cluster.id}}');
|
||||
setInterval(getHaCluster, 60000, '{{cluster.id}}');
|
||||
{% endfor %}
|
||||
</script>
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue