startup errors fix #2
This commit is contained in:
1 parent
4cca40a626
commit
79165b49b5
5 files changed
+80
-5
No files matched your search
@@ -47,9 +47,11 @@ async def indexer_loop(memory, platform_found: bool, seqno: int) -> [bool, int]:
|
||||
except BaseException as e:
|
||||
make_log("TON_Daemon", f"Error while saving TON per STAR price: {e}" + '\n' + traceback.format_exc(), level="ERROR")
|
||||
|
||||
from sqlalchemy import cast
|
||||
from sqlalchemy.dialects.postgresql import JSONB
|
||||
new_licenses = (await session.execute(select(UserContent).where(
|
||||
and_(
|
||||
~UserContent.meta.contains({'notification_sent': True}),
|
||||
~(cast(UserContent.meta, JSONB).contains({'notification_sent': True})),
|
||||
UserContent.type == 'nft/listen'
|
||||
)
|
||||
))).scalars().all()
|
||||
|
||||
@@ -77,7 +77,7 @@ async def license_index_loop(memory, platform_found: bool, seqno: int) -> [bool,
|
||||
User.last_use > datetime.now() - timedelta(hours=4)
|
||||
).order_by(User.updated.asc()))).scalars().all()
|
||||
for user in users:
|
||||
user_wallet_address = user.wallet_address(session)
|
||||
user_wallet_address = await user.wallet_address_async(session)
|
||||
if not user_wallet_address:
|
||||
make_log("LicenseIndex", f"User {user.id} has no wallet address", level="info")
|
||||
continue
|
||||
|
||||
@@ -97,7 +97,7 @@ async def main_fn(memory):
|
||||
service_wallet.create_transfer_message(
|
||||
[{
|
||||
'address': highload_wallet.address.to_string(1, 1, 0),
|
||||
'amount': int(0.08 * 10 ** 9),
|
||||
'amount': int(0.02 * 10 ** 9),
|
||||
'send_mode': 1,
|
||||
'payload': begin_cell().store_uint(0, 32).end_cell()
|
||||
}], sw_seqno_value
|
||||
|
||||
Reference in new issue
Block a user