@@ -1036,9 +1036,7 @@ async def countryTop(
1036
1036
1037
1037
xquery = selectQuery (surftimer .queries .sql_stray_countryTop .format (country , style ))
1038
1038
1039
- if xquery :
1040
- xquery = xquery .pop ()
1041
- else :
1039
+ if len (xquery ) <= 0 :
1042
1040
response .status_code = status .HTTP_204_NO_CONTENT
1043
1041
return response
1044
1042
@@ -1078,9 +1076,7 @@ async def countryTopAllCountries(
1078
1076
surftimer .queries .sql_stray_countryTopAllCountries .format (style )
1079
1077
)
1080
1078
1081
- if xquery :
1082
- xquery = xquery .pop ()
1083
- else :
1079
+ if len (xquery ) <= 0 :
1084
1080
response .status_code = status .HTTP_204_NO_CONTENT
1085
1081
return response
1086
1082
@@ -1300,9 +1296,7 @@ async def continentTop(
1300
1296
surftimer .queries .sql_stray_continentTop .format (continentCode , style )
1301
1297
)
1302
1298
1303
- if xquery :
1304
- xquery = xquery .pop ()
1305
- else :
1299
+ if len (xquery ) <= 0 :
1306
1300
response .status_code = status .HTTP_204_NO_CONTENT
1307
1301
return response
1308
1302
@@ -1340,9 +1334,7 @@ async def continentNames(
1340
1334
1341
1335
xquery = selectQuery (surftimer .queries .sql_stray_continentNames .format (style ))
1342
1336
1343
- if xquery :
1344
- xquery = xquery .pop ()
1345
- else :
1337
+ if len (xquery ) <= 0 :
1346
1338
response .status_code = status .HTTP_204_NO_CONTENT
1347
1339
return response
1348
1340
@@ -1383,9 +1375,7 @@ async def viewPlayerRank(
1383
1375
surftimer .queries .sql_stray_viewPlayerRank .format (style , steamid32 , style )
1384
1376
)
1385
1377
1386
- if xquery :
1387
- xquery = xquery .pop ()
1388
- else :
1378
+ if len (xquery ) <= 0 :
1389
1379
response .status_code = status .HTTP_204_NO_CONTENT
1390
1380
return response
1391
1381
@@ -1532,12 +1522,11 @@ async def rankCommandSelf(
1532
1522
request : Request ,
1533
1523
response : Response ,
1534
1524
steamid32 : str ,
1535
- limit : int ,
1536
1525
):
1537
1526
"""`char[] sql_stray_rankCommandSelf = ....`"""
1538
1527
tic = time .perf_counter ()
1539
1528
1540
- cache_key = f"rankCommandSelf:{ steamid32 } - { limit } "
1529
+ cache_key = f"rankCommandSelf:{ steamid32 } "
1541
1530
cached_data = get_cache (cache_key )
1542
1531
if cached_data is not None :
1543
1532
print (f"[Redis] Loaded '{ cache_key } ' ({ time .perf_counter () - tic :0.4f} s)" )
@@ -1547,7 +1536,7 @@ async def rankCommandSelf(
1547
1536
return response
1548
1537
1549
1538
xquery = selectQuery (
1550
- surftimer .queries .sql_stray_rankCommandSelf .format (steamid32 , limit )
1539
+ surftimer .queries .sql_stray_rankCommandSelf .format (steamid32 )
1551
1540
)
1552
1541
1553
1542
if xquery :
0 commit comments