dev@locazia: add service healthy montoring
This commit is contained in:
1 parent
e0a4514fef
commit
fcc5ccbe65
9 files changed
+139
-16
No files matched your search
@@ -3,6 +3,7 @@ from contextlib import asynccontextmanager
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from app.core.logger import make_log
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
class Memory:
|
||||
@@ -12,6 +13,25 @@ class Memory:
|
||||
|
||||
self.transactions_disabled = False
|
||||
|
||||
self.known_states = {
|
||||
"uploader": {
|
||||
"status": "no status",
|
||||
"timestamp": None
|
||||
},
|
||||
"uploader_bot": {
|
||||
"status": "no status",
|
||||
"timestamp": None
|
||||
},
|
||||
"indexator": {
|
||||
"status": "no status",
|
||||
"timestamp": None
|
||||
},
|
||||
"ton_daemon": {
|
||||
"status": "no status",
|
||||
"timestamp": None
|
||||
}
|
||||
}
|
||||
|
||||
@asynccontextmanager
|
||||
async def transaction(self, desc=""):
|
||||
make_log("Memory.transaction", f"Starting transaction; {desc}", level='debug')
|
||||
|
||||
Reference in new issue
Block a user