new functions
This commit is contained in:
@@ -6,7 +6,7 @@ from ..config import POLL_INTERVAL
|
||||
from .preferences import active_profile, get_profile
|
||||
from .torrent_cache import torrent_cache
|
||||
from .torrent_summary import cached_summary
|
||||
from . import rtorrent, smart_queue, traffic_history, automation_rules
|
||||
from . import rtorrent, smart_queue, traffic_history, automation_rules, torrent_stats
|
||||
|
||||
_started = False
|
||||
|
||||
@@ -43,6 +43,9 @@ def register_socketio_handlers(socketio):
|
||||
heartbeat["ok"] = False
|
||||
heartbeat["error"] = str(exc)
|
||||
socketio.emit("rtorrent_error", {"profile_id": profile["id"], "error": str(exc)})
|
||||
if tick % max(1, int(15 * 60 / POLL_INTERVAL)) == 0:
|
||||
# Note: Torrent statistics are refreshed in the background every 15 minutes after startup delay.
|
||||
torrent_stats.maybe_refresh(profile, force=False)
|
||||
if tick % max(1, int(30 / POLL_INTERVAL)) == 0:
|
||||
try:
|
||||
result = smart_queue.check(profile, force=False)
|
||||
|
||||
Reference in New Issue
Block a user