- CA409E06CB9491B00378C24BB0A189ED752C01A46B3D8406F403F7E7D378D4A62F91A1ADA8EAB3FFDF374E4A62EA3A5EDF3EDB48CD5500BBDE30F3E8153C209F
+ 78ED8993826A75EAB1B2D638F6A61BD6AED1727786F1687F909E41F95379F4556574F4B363B525C5A2D6987340D6E67FAE17E9F6DB92D9900F2430B428E45778
blatta/lib/state.py
(19 . 10)(19 . 11)
190 'embargo_interval_seconds': 1,
191 'rubbish_interval_seconds': 10,
192 'nick': '',
193 'order_buffer_check_seconds': 5 * 60,
194 'order_buffer_expiration_seconds': 5 * 60,
195 'order_buffer_check_seconds': 180,
196 'order_buffer_expiration_seconds': 120,
197 'short_buffer_expiration_seconds': 1,
198 'short_buffer_check_interval_seconds': 1,
199 'getdata_requests_expiration_seconds': 10,
200 'peer_offline_interval_seconds': 60,
201 'peer_away_interval_seconds': 10 * 60,
202 'presence_check_seconds': 5,
(183 . 6)(184 . 8)
204 h = cursor.execute("select handle from handles where handle_id=?",
205 (handle_id,)).fetchone()[0]
206 if updated_at_utc:
207 if '.' not in updated_at_utc:
208 updated_at_utc = updated_at_utc + '.0'
209 dt_format = '%Y-%m-%d %H:%M:%S.%f'
210 dt_utc = datetime.datetime.strptime(updated_at_utc, dt_format)
211 dt_local = self.utc_to_local(dt_utc)
(383 . 7)(386 . 11)
213 def handle_is_online(self, handle):
214 # last rubbish message from peer associated with handle is
215 # sufficiently recent
216 at = self.get_at(handle)[0]
217 try:
218 at = self.get_at(handle)[0]
219 except IndexError:
220 return False
221
222 if at["active_at_unixtime"] > time.time() - int(self.get_knob("peer_offline_interval_seconds")):
223 return True
224 else: