Removed unneeded function last_notitification

This commit is contained in:
spla 2020-11-17 18:08:40 +01:00
pare aecb8abbad
commit 7e8bfbdb63

Veure arxiu

@ -20,42 +20,6 @@ def unescape(s):
s = s.replace("'", "'")
return s
def last_notification():
###################################################################
# query status_created_at of last notification
try:
conn = None
conn = psycopg2.connect(database = chess_db, user = chess_db_user, password = "", host = "/var/run/postgresql", port = "5432")
cur = conn.cursor()
cur.execute("select status_created_at from botreplies order by status_created_at desc limit 1")
row = cur.fetchone()
if row != None:
last_posted = row[0]
last_posted = last_posted.strftime("%d/%m/%Y, %H:%M:%S")
else:
last_posted = ""
cur.close()
return last_posted
except (Exception, psycopg2.DatabaseError) as error:
print(error)
finally:
if conn is not None:
conn.close()
def get_bot_id():
###################################################################################################################################