mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-17 16:09:14 +00:00
Fix message type checking
This commit is contained in:
parent
3ba94e02da
commit
33bd7f84b9
|
@ -101,9 +101,9 @@ class Subscription:
|
|||
async with async_timeout.timeout(1):
|
||||
message = await pubsub.get_message()
|
||||
if message:
|
||||
if message['data'] == 'set':
|
||||
await r.get('api_test')
|
||||
yield int(await r.get('api_test'))
|
||||
if message['data'] == b'set':
|
||||
retrieved_value = await r.get('api_test')
|
||||
yield int(retrieved_value)
|
||||
else:
|
||||
await asyncio.sleep(0.01)
|
||||
except asyncio.TimeoutError:
|
||||
|
|
Loading…
Reference in a new issue