mirror of
https://github.com/StefBuwalda/dashboard_test.git
synced 2025-10-30 03:09:59 +00:00
Added TODO notes
This commit is contained in:
@@ -69,6 +69,8 @@ async def update_services():
|
|||||||
# Actual update loop
|
# Actual update loop
|
||||||
while True:
|
while True:
|
||||||
session = WorkerSession()
|
session = WorkerSession()
|
||||||
|
# TODO: Add http processing time var
|
||||||
|
# instead of just adding 1 second
|
||||||
sleeptask = asyncio.create_task(asyncio.sleep(timeout_ / 1000 + 1))
|
sleeptask = asyncio.create_task(asyncio.sleep(timeout_ / 1000 + 1))
|
||||||
tasks = [
|
tasks = [
|
||||||
ping_service(client=client, s=s)
|
ping_service(client=client, s=s)
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ bp = Blueprint(
|
|||||||
static_folder="static",
|
static_folder="static",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# TODO: Move util functions to seperate file (utils.py?)
|
||||||
|
|
||||||
|
|
||||||
# Prepares log data for chart.js chart
|
# Prepares log data for chart.js chart
|
||||||
def prepare_chart_data(
|
def prepare_chart_data(
|
||||||
@@ -27,6 +29,9 @@ def prepare_chart_data(
|
|||||||
log1 = logs[i]
|
log1 = logs[i]
|
||||||
log2 = logs[i - 1]
|
log2 = logs[i - 1]
|
||||||
|
|
||||||
|
# TODO: add timeout duration to log so this can be used
|
||||||
|
# instead of 1.5 * the current timeout + 1.
|
||||||
|
|
||||||
# Check if the gap in points exceeds a threshold
|
# Check if the gap in points exceeds a threshold
|
||||||
if (abs(log1.dateCreatedUTC() - log2.dateCreatedUTC())) > timedelta(
|
if (abs(log1.dateCreatedUTC() - log2.dateCreatedUTC())) > timedelta(
|
||||||
milliseconds=1.5 * (timeout + 1000)
|
milliseconds=1.5 * (timeout + 1000)
|
||||||
|
|||||||
Reference in New Issue
Block a user