Update.
This commit is contained in:
parent
ba7bbbfc62
commit
f2575e04fb
@ -171,19 +171,12 @@ class Application(BaseApplication):
|
|||||||
self.ip2location = IP2Location.IP2Location(
|
self.ip2location = IP2Location.IP2Location(
|
||||||
base_path.joinpath("IP2LOCATION-LITE-DB11.BIN")
|
base_path.joinpath("IP2LOCATION-LITE-DB11.BIN")
|
||||||
)
|
)
|
||||||
self.on_startup.append(self.prepare_stats)
|
|
||||||
self.on_startup.append(self.prepare_asyncio)
|
self.on_startup.append(self.prepare_asyncio)
|
||||||
self.on_startup.append(self.start_user_availability_service)
|
self.on_startup.append(self.start_user_availability_service)
|
||||||
self.on_startup.append(self.start_ssh_server)
|
self.on_startup.append(self.start_ssh_server)
|
||||||
self.on_startup.append(self.prepare_database)
|
self.on_startup.append(self.prepare_database)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async def prepare_stats(self, app):
|
|
||||||
app['stats'] = create_stats_structure()
|
|
||||||
print("Stats prepared", flush=True)
|
|
||||||
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def uptime_seconds(self):
|
def uptime_seconds(self):
|
||||||
return (datetime.now() - self.time_start).total_seconds()
|
return (datetime.now() - self.time_start).total_seconds()
|
||||||
|
Loading…
Reference in New Issue
Block a user