mirror of
https://github.com/aclist/dztui.git
synced 2026-08-30 11:47:17 +02:00
Compare commits
No commits in common. "0bb618b703ede1a549b9338369ce797f8b2afa78" and "673038a1aba3274806ff5544376d9ae98235bfe3" have entirely different histories.
0bb618b703
...
673038a1ab
@ -15,7 +15,7 @@ from dzgui.const.constants import (
|
|||||||
from dzgui.const.enum import FilterMode, Preferences, ServerTab
|
from dzgui.const.enum import FilterMode, Preferences, ServerTab
|
||||||
from dzgui.managers.threading import call_on_thread, StoredFunc, ThreadingManager
|
from dzgui.managers.threading import call_on_thread, StoredFunc, ThreadingManager
|
||||||
from dzgui.strings import dialogs
|
from dzgui.strings import dialogs
|
||||||
from dzgui.util.strings import server_timeout, dialog
|
from dzgui.util.strings import api_warn_msg, dialog
|
||||||
from dzgui.views.dialogs.generic import ExceptionDialog
|
from dzgui.views.dialogs.generic import ExceptionDialog
|
||||||
|
|
||||||
import gi
|
import gi
|
||||||
@ -177,16 +177,13 @@ class ServerModelManager:
|
|||||||
return
|
return
|
||||||
self.thread_man.increment_dialog()
|
self.thread_man.increment_dialog()
|
||||||
|
|
||||||
"""
|
# NOTE: collects futures in linear order after completion
|
||||||
Collects futures in linear order after completion
|
# for lock-step representation of the state file
|
||||||
for lock-step representation of the state file
|
|
||||||
"""
|
|
||||||
for future in futures:
|
for future in futures:
|
||||||
res = future.result(timeout=API_TIMEOUT)
|
res = future.result(timeout=API_TIMEOUT)
|
||||||
# NOTE: failing entries are culled
|
# NOTE: failing entries are culled
|
||||||
if res is None:
|
if res is None:
|
||||||
# TODO: log which servers failed
|
# TODO: log which servers failed
|
||||||
# query_direct() currently does not return enough information
|
|
||||||
continue
|
continue
|
||||||
servers.append(res)
|
servers.append(res)
|
||||||
if len(servers) == 0:
|
if len(servers) == 0:
|
||||||
@ -241,6 +238,7 @@ class ServerModelManager:
|
|||||||
|
|
||||||
self.first_iteration = False
|
self.first_iteration = False
|
||||||
self.emitter.emit("load_maps", store)
|
self.emitter.emit("load_maps", store)
|
||||||
|
# self.emitter.emit("servers_loaded_init")
|
||||||
|
|
||||||
# TODO: dataclass for record rows; check for other dict annotations
|
# TODO: dataclass for record rows; check for other dict annotations
|
||||||
def add_to_history(self, data: tuple[dict[str, Any], "Record"]) -> None:
|
def add_to_history(self, data: tuple[dict[str, Any], "Record"]) -> None:
|
||||||
@ -419,7 +417,7 @@ class ServerModelManager:
|
|||||||
# TODO: distinguish signals, e.g. "servers_failed_to_load", "servers_loaded_empty"
|
# TODO: distinguish signals, e.g. "servers_failed_to_load", "servers_loaded_empty"
|
||||||
# customize statusbar and dialog accordingly
|
# customize statusbar and dialog accordingly
|
||||||
if show_dialog:
|
if show_dialog:
|
||||||
dialog = ExceptionDialog(self.controller, server_timeout)
|
dialog = ExceptionDialog(self.controller, api_warn_msg)
|
||||||
dialog.run()
|
dialog.run()
|
||||||
|
|
||||||
def _push_data(self, data: list[Any]) -> None:
|
def _push_data(self, data: list[Any]) -> None:
|
||||||
|
|||||||
@ -100,7 +100,10 @@ steam_missing = "Local Steam installation is not set, possibly malformed config
|
|||||||
build_corrupted = (
|
build_corrupted = (
|
||||||
"Steam settings or DayZ installation may be corrupted. Try restarting Steam."
|
"Steam settings or DayZ installation may be corrupted. Try restarting Steam."
|
||||||
)
|
)
|
||||||
server_timeout = "Timed out when querying server(s). Check IP or try again later."
|
api_warn_msg = """No servers returned. Please wait and try again.
|
||||||
|
This usually indicates a transitory network timeout. If this issue persists, your API key or network may be malfunctioning.
|
||||||
|
"""
|
||||||
|
server_timeout = "Timed out when querying server, check IP or try again later."
|
||||||
server_error = (
|
server_error = (
|
||||||
"Error while contacting server, possibly timed out. Please wait and try again."
|
"Error while contacting server, possibly timed out. Please wait and try again."
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user