From 3ab60034bc8a71df3791d8ba32ca46cad120af4c Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 9 Sep 2019 18:43:21 +0300 Subject: add show_status.py --- vk/tracking/status_tracker.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'vk/tracking') 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): -- cgit v1.2.3