mirror of
https://github.com/aclist/dztui.git
synced 2026-10-31 07:02:50 +01:00
change: ease rate limit
This commit is contained in:
1 parent
3ae0c8428a
commit
780402d14f
1 file changed
+3
-2
@@ -12,10 +12,10 @@ from dzgui.api.mods import (
|
|||||||
remove_stale_signatures,
|
remove_stale_signatures,
|
||||||
)
|
)
|
||||||
from dzgui.const.constants import (
|
from dzgui.const.constants import (
|
||||||
|
API_RATE_LIMIT,
|
||||||
APP_NAME,
|
APP_NAME,
|
||||||
APPID_DAYZ,
|
APPID_DAYZ,
|
||||||
APPID_DAYZ_EXP,
|
APPID_DAYZ_EXP,
|
||||||
RATE_LIMIT_THRESHOLD,
|
|
||||||
)
|
)
|
||||||
from dzgui.const.enum import Preferences
|
from dzgui.const.enum import Preferences
|
||||||
from dzgui.managers.threading import call_on_thread, StoredFunc, ThreadingManager
|
from dzgui.managers.threading import call_on_thread, StoredFunc, ThreadingManager
|
||||||
@@ -109,6 +109,7 @@ class ModManager:
|
|||||||
def unsub_all_mods(self, mods: list[tuple[str, Gtk.TreeIter]]) -> None:
|
def unsub_all_mods(self, mods: list[tuple[str, Gtk.TreeIter]]) -> None:
|
||||||
for mod, _iter in mods:
|
for mod, _iter in mods:
|
||||||
self.unsub_atomic_mod(mod)
|
self.unsub_atomic_mod(mod)
|
||||||
|
time.sleep(API_RATE_LIMIT)
|
||||||
|
|
||||||
iters = [_iter for mod, _iter in mods]
|
iters = [_iter for mod, _iter in mods]
|
||||||
func = StoredFunc(self._on_mods_unsubbed, iters)
|
func = StoredFunc(self._on_mods_unsubbed, iters)
|
||||||
@@ -136,7 +137,7 @@ class ModManager:
|
|||||||
symlink.unlink()
|
symlink.unlink()
|
||||||
except PeFile.AppNotInstalledError:
|
except PeFile.AppNotInstalledError:
|
||||||
pass
|
pass
|
||||||
time.sleep(RATE_LIMIT_THRESHOLD)
|
time.sleep(API_RATE_LIMIT)
|
||||||
|
|
||||||
def _on_mods_unsubbed(self, iters: list[Gtk.TreeIter]) -> None:
|
def _on_mods_unsubbed(self, iters: list[Gtk.TreeIter]) -> None:
|
||||||
if self.store is None:
|
if self.store is None:
|
||||||
|
|||||||
Reference in new issue
Block a user