Compare commits

..

No commits in common. "8d684856c9c3422eb3e8b3925991048090b99137" and "ef861e6bcc687f2be51a82090b5921b0823694d8" have entirely different histories.

View File

@ -44,8 +44,6 @@ def get_top_dicks():
return top
@app.route('/metrics')
def metrics():
metrics = ""
@ -71,7 +69,10 @@ def metrics():
i -= 1
upper_dick_size = docks[i][1]
metrics += 'pipisio_topdick_distanso{user="%s", user_id="%s", chat_id="%s"} %s\n' % (docks[k][0], docks[k][2], docks[k][3], (upper_dick_size - docks[k][1]))
if i == 0:
metrics += 'pipisio_topdick_distanso{user="%s", user_id="%s", chat_id="%s"} %s\n' % (docks[k][0], docks[k][2], docks[k][3], 0)
else:
metrics += 'pipisio_topdick_distanso{user="%s", user_id="%s", chat_id="%s"} %s\n' % (docks[k][0], docks[k][2], docks[k][3], (upper_dick_size - docks[k][1]))
return metrics