This commit is contained in:
spla 2023-01-10 01:11:34 +01:00
pare b7a55dc0dc
commit 6a877e6e46
S'han modificat 2 arxius amb 7 adicions i 7 eliminacions

Veure arxiu

@ -61,7 +61,7 @@ class Server:
try:
users = nodeinfo_json.get('usage').get('users').get('total') or '0'
if users > 1000000:
if int(users) > 1000000:
users = 1
@ -93,11 +93,11 @@ class Server:
else:
if api == '/api/v1/instance?':
if api == '/api/v1/instance':
try:
users = nodeinfo_json.get('stats').get('user_count') or '0'
if users > 1000000:
if int(users) > 1000000:
users = 1

Veure arxiu

@ -12,7 +12,7 @@ import socket
import ray
import pdb
#ray.init(num_cpus = 25) # Specify this system CPUs.
ray.init(num_cpus = 25) # Specify this system CPUs.
from ray.exceptions import (
RaySystemError,
@ -201,7 +201,7 @@ def getsoft(server):
soft = soft.lower()
soft_version = nodeinfo_json['software']['version']
users = nodeinfo_json.get('usage').get('users').get('total') or '0'
if users > 1000000:
if int(users) > 1000000:
return
self.mau = nodeinfo_json.get('usage').get('users').get('activeMonth') or 0
alive = True
@ -225,7 +225,7 @@ def getsoft(server):
soft = soft.lower()
soft_version = nodeinfo_json['server']['version']
users = nodeinfo_json['usage']['users']['total']
if users > 1000000:
if int(users) > 1000000:
return
self.mau = nodeinfo_json.get('usage').get('users').get('activeMonth') or 0
alive = True
@ -252,7 +252,7 @@ def getsoft(server):
users = nodeinfo_json['stats']['user_count']
if users > 1000000:
if int(users) > 1000000:
return