Написал код:
async def test():
connect = sqlite3.connect("users.db")
cursor = connect.cursor()
while 1:
time.sleep(1)
cursor.execute(f'UPDATE Ферма SET timer = timer - 1 WHERE model = 1 AND banf = 0')
cursor.execute(f'UPDATE Ферма SET ntime = ntime - 1 WHERE model = 1 AND banf = 0')
cursor.execute(f'UPDATE Ферма SET ptime = ptime - 1 WHERE banf = 0')
cursor.execute(f'UPDATE Ферма SET timer = timer - 1 WHERE model = 2 AND banf = 0')
cursor.execute(f'UPDATE Ферма SET ntime = ntime - 1 WHERE model = 2 AND banf = 0')
cursor.execute(f'UPDATE Ферма SET timer = timer - 1 WHERE model = 3 AND banf = 0')
cursor.execute(f'UPDATE Ферма SET ntime = ntime - 1 WHERE model = 3 AND banf = 0')
cursor.execute(f'UPDATE Ферма SET Баланс = Баланс + sym WHERE banf = 0 AND timer = 1')
cursor.execute(f'UPDATE Ферма SET nalog = nalog + 10000 WHERE banf = 0 AND model = 1 AND ntime = 1')
cursor.execute(f'UPDATE Ферма SET nalog = nalog + 20000 WHERE banf = 0 AND model = 2 AND ntime = 1')
cursor.execute(f'UPDATE Ферма SET nalog = nalog + 30000 WHERE banf = 0 AND model = 3 AND ntime = 1')
cursor.execute(f'UPDATE Ферма SET banf = 1 WHERE nalog = 200000 AND ntime = 1')
cursor.execute(f'UPDATE Ферма SET ntime = ntime + 300 WHERE ntime = 1')
cursor.execute(f'UPDATE Ферма SET timer = timer + 900 WHERE timer = 1')
cursor.execute(f'UPDATE Ферма SET ptime = ptime + 28200 WHERE ptime = 1')
connect.commit()
Thread(target=test).start()
Ошибка при запуске:
/data/user/0/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.9/threading.py:910: RuntimeWarning: coroutine 'test' was never awaited
self._target(*self._args, **self._kwargs)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
INFO:aiogram:Bot: [@GreenWixGame_bot]
WARNING:aiogram:Updates were skipped successfully.
INFO:aiogram.dispatcher.dispatcher:Start polling.
Пожалуйста помогите