stars fixes
This commit is contained in:
parent
10cb581b34
commit
79593f1e75
|
|
@ -86,13 +86,13 @@ async def s_api_v1_content_view(request, content_address: str):
|
|||
StarsInvoice.user_id == request.ctx.user.id,
|
||||
StarsInvoice.created > datetime.now() - timedelta(minutes=25),
|
||||
StarsInvoice.amount == stars_cost,
|
||||
StarsInvoice.external_id == invoice_id
|
||||
StarsInvoice.content_hash == content['encrypted_content'].hash,
|
||||
)
|
||||
).first()
|
||||
if exist_invoice:
|
||||
invoice_url = exist_invoice.invoice_url
|
||||
else:
|
||||
invocie_url = None
|
||||
invoice_url = None
|
||||
try:
|
||||
invoice_url = await Bot(token=CLIENT_TELEGRAM_API_KEY).create_invoice_link(
|
||||
'Lifetime access to content',
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ async def license_index_loop(memory, platform_found: bool, seqno: int) -> [bool,
|
|||
async def check_telegram_stars_transactions():
|
||||
# Проверка звездных telegram транзакций, обновление paid
|
||||
offset = {'desc': 'Статичное число заранее известного количества транзакций, которое даже не знает наш бот', 'value': 1}['value'] + \
|
||||
session.query(StarsInvoice).count()
|
||||
0 # session.query(StarsInvoice).count()
|
||||
limit = 100
|
||||
while True:
|
||||
make_log("StarsProcessing", f"Star payments: offset={offset}, limit={limit}", level="DEBUG")
|
||||
|
|
|
|||
Loading…
Reference in New Issue