aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/vk
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2019-09-09 18:43:21 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2019-09-09 18:43:21 +0300
commit3ab60034bc8a71df3791d8ba32ca46cad120af4c (patch)
tree1fe67f6247a294773ddf2b5627ce4571a4bfae8f /vk
parentadd "service" access_token (diff)
downloadvk-scripts-3ab60034bc8a71df3791d8ba32ca46cad120af4c.tar.gz
vk-scripts-3ab60034bc8a71df3791d8ba32ca46cad120af4c.zip
add show_status.py
Diffstat (limited to 'vk')
-rw-r--r--vk/tracking/status_tracker.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/vk/tracking/status_tracker.py b/vk/tracking/status_tracker.py
index e1a3216..8b90d1c 100644
--- a/vk/tracking/status_tracker.py
+++ b/vk/tracking/status_tracker.py
@@ -85,10 +85,14 @@ class StatusTracker:
old_users[uid] = user
yield user
- def _do_loop(self, uids):
+ def query_status(self, uids):
users = self._query_initial_status(uids)
for user in users.values():
self._notify_status(user)
+ return users
+
+ def _do_loop(self, uids):
+ users = self.query_status(uids)
while True:
updated_users = self._query_status_updates(uids)
for user in self._filter_status_updates(users, updated_users):