Pinging only active servers / websites
This commit is contained in:
1 parent
fd89bf42c4
commit
bcd9804636
1 file changed
+2
-2
@@ -101,7 +101,7 @@ def getUsers(conn: pymysql.Connection) -> {}:
|
||||
|
||||
def getServersToPing(conn: pymysql.Connection) -> [{}]:
|
||||
cur = conn.cursor()
|
||||
cur.execute("SELECT server_id, admin_id, name, hostname FROM servers")
|
||||
cur.execute("SELECT server_id, admin_id, name, hostname FROM servers WHERE monitoring_active = 1")
|
||||
results = cur.fetchall()
|
||||
servers = []
|
||||
cur.close()
|
||||
@@ -119,7 +119,7 @@ def getServersToPing(conn: pymysql.Connection) -> [{}]:
|
||||
|
||||
def getWebsitesToPing(conn: pymysql.Connection) -> [{}]:
|
||||
cur = conn.cursor()
|
||||
cur.execute("SELECT website_id, admin_id, name, url FROM websites")
|
||||
cur.execute("SELECT website_id, admin_id, name, url FROM websites WHERE monitoring_active = 1")
|
||||
results = cur.fetchall()
|
||||
websites = []
|
||||
cur.close()
|
||||
|
||||
Reference in new issue
Block a user