NonProjects / tgbox

Encrypted cloud storage Protocol based on Telegram
https://tgbox.readthedocs.io/
GNU Lesser General Public License v2.1
34 stars 4 forks source link

Doesn't update LocalBox with asyncio.gather #5

Closed NotStatilko closed 2 years ago

NotStatilko commented 2 years ago
result = await gather(
    rb.push_file(await dlb.make_file(open('test.jpg','rb'))),
    rb.push_file(await dlb.make_file(open('test.jpg','rb'))),
    rb.push_file(await dlb.make_file(open('test.jpg','rb')))
)
print(result)
Traceback (most recent call last):
  File "/home/non/Scripts/py_projects/tgbox-env/test.py", line 202, in <module>
    loop.run_until_complete(main())
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/home/non/Scripts/py_projects/tgbox-env/test.py", line 77, in main
    result = await gather(
  File "/home/non/Scripts/py_projects/tgbox-env/tgbox/api.py", line 415, in push_file
    await ff.make_local(file_message.id, 
  File "/home/non/Scripts/py_projects/tgbox-env/tgbox/api.py", line 1992, in make_local
    maybe_file = await self.dlb._tgbox_db.Files.select_once(
  File "/home/non/Scripts/py_projects/tgbox-env/tgbox/db.py", line 44, in select_once
    return await (self.select(sql_tuple=sql_tuple)).__anext__()
StopAsyncIteration