yeref 0.25.25__py3-none-any.whl → 0.25.26__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
yeref/yeref.py
CHANGED
@@ -4020,6 +4020,34 @@ async def check_schema_exists(schema_name, db_pool):
|
|
4020
4020
|
return result
|
4021
4021
|
|
4022
4022
|
|
4023
|
+
async def not_del_if_payments(chat_id, status, BASE_P):
|
4024
|
+
try:
|
4025
|
+
sql = "SELECT USER_VARS, USER_LSTS FROM \"USER\" WHERE USER_TID=$1"
|
4026
|
+
data_users = await db_select_pg(sql, (chat_id,), BASE_P)
|
4027
|
+
if not len(data_users): return
|
4028
|
+
print(f"{data_users=}")
|
4029
|
+
USER_VARS, USER_LSTS = data_users[0]
|
4030
|
+
|
4031
|
+
USER_LSTS = json.loads(USER_LSTS or USER_LSTS_)
|
4032
|
+
USER_TXS = USER_LSTS.get("USER_TXS", [])
|
4033
|
+
USER_PAYMENTS = USER_LSTS.get("USER_PAYMENTS", [])
|
4034
|
+
USER_STATUSES = USER_LSTS.get("USER_STATUSES", [])
|
4035
|
+
|
4036
|
+
if len(USER_TXS) or len(USER_PAYMENTS):
|
4037
|
+
dt_ = datetime.now(timezone.utc).strftime('%d-%m-%Y_%H-%M-%S')
|
4038
|
+
USER_STATUSES.append({status: dt_})
|
4039
|
+
USER_LSTS["USER_STATUSES"] = USER_STATUSES
|
4040
|
+
USER_LSTS = json.dumps(USER_LSTS, ensure_ascii=False)
|
4041
|
+
|
4042
|
+
sql = "UPDATE \"USER\" SET USER_LSTS=$1 WHERE USER_TID=$2"
|
4043
|
+
await db_change_pg(sql, (USER_LSTS, chat_id,), BASE_P)
|
4044
|
+
elif status in ['left', 'kicked']:
|
4045
|
+
sql = "DELETE FROM \"USER\" WHERE USER_TID=$1"
|
4046
|
+
await db_change_pg(sql, (chat_id,), BASE_P)
|
4047
|
+
print("DELETE FROM \"USER\" WHERE USER_TID=$1")
|
4048
|
+
except Exception as e:
|
4049
|
+
logger.info(log_ % str(e))
|
4050
|
+
await asyncio.sleep(round(random.uniform(0, 1), 2))
|
4023
4051
|
# endregion
|
4024
4052
|
|
4025
4053
|
|
@@ -0,0 +1,8 @@
|
|
1
|
+
yeref/__init__.py,sha256=Qpv3o6Xa78VdLcsSRmctGtpnYE9btpAkCekgGhgJyXM,49
|
2
|
+
yeref/l_.py,sha256=LsciHUN0b5NbsLsRRbG12blZGXVr_i4Fhj2aQItIZbI,1173447
|
3
|
+
yeref/tonweb.js,sha256=Jf6aFOQ1OIY4q7fINYz-m5LsI3seMus124M5SYYZmtE,443659
|
4
|
+
yeref/yeref.py,sha256=5zBKB6tuYTWiNR0Ig8T6aPcE2y8UwF8evLdJ61ikOUI,1024265
|
5
|
+
yeref-0.25.26.dist-info/METADATA,sha256=TSBCijCgFKtFAyyU2Or6JwvW9x6Y_81dl-vsyD3VHDg,119
|
6
|
+
yeref-0.25.26.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
7
|
+
yeref-0.25.26.dist-info/top_level.txt,sha256=yCQKchWHbfV-3OuQPYRdi2loypD-nmbDJbtt3OuKKkY,6
|
8
|
+
yeref-0.25.26.dist-info/RECORD,,
|
yeref-0.25.25.dist-info/RECORD
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
yeref/__init__.py,sha256=Qpv3o6Xa78VdLcsSRmctGtpnYE9btpAkCekgGhgJyXM,49
|
2
|
-
yeref/l_.py,sha256=LsciHUN0b5NbsLsRRbG12blZGXVr_i4Fhj2aQItIZbI,1173447
|
3
|
-
yeref/tonweb.js,sha256=Jf6aFOQ1OIY4q7fINYz-m5LsI3seMus124M5SYYZmtE,443659
|
4
|
-
yeref/yeref.py,sha256=535y-Gxl0sIXiQI5usvZCFOglwDUzX11B-2zkgDFHsk,1022947
|
5
|
-
yeref-0.25.25.dist-info/METADATA,sha256=I9EdC61TWL5CJGwV4BNTPFYZl0YZPYRNTzGA85JvPUM,119
|
6
|
-
yeref-0.25.25.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
7
|
-
yeref-0.25.25.dist-info/top_level.txt,sha256=yCQKchWHbfV-3OuQPYRdi2loypD-nmbDJbtt3OuKKkY,6
|
8
|
-
yeref-0.25.25.dist-info/RECORD,,
|
File without changes
|
File without changes
|