Commit d234da1a authored by Tristan Cavelier's avatar Tristan Cavelier

erp5cluster: Updated monitor stack

parent f26d46e3
......@@ -48,7 +48,7 @@ mode = 0644
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
download-only = true
md5sum = cb2f15850d3dc82459a0044adb4416cf
md5sum = 9364ed5da70c630efb3c9a59e79a816b
destination = ${buildout:directory}/parts/monitor-template-monitor-bin
filename = monitor.py.in
mode = 0644
......
......@@ -72,6 +72,22 @@ CREATE TABLE IF NOT EXISTS individual_status (
db.commit()
db.close()
def init_db():
db = sqlite3.connect(db_path)
c = db.cursor()
c.executescript("""
CREATE TABLE IF NOT EXISTS status (
timestamp INTEGER UNIQUE,
status VARCHAR(255));
CREATE TABLE IF NOT EXISTS individual_status (
timestamp INTEGER,
status VARCHAR(255),
element VARCHAR(255),
output TEXT);
""")
db.commit()
db.close()
def getListOfScripts(directory):
"""
Get the list of script inside of a directory (not recursive)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment