diff options
Diffstat (limited to 'glances/exports/glances_cassandra.py')
-rw-r--r-- | glances/exports/glances_cassandra.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/glances/exports/glances_cassandra.py b/glances/exports/glances_cassandra.py index e3a347c8..a0c25ca5 100644 --- a/glances/exports/glances_cassandra.py +++ b/glances/exports/glances_cassandra.py @@ -94,7 +94,8 @@ class Export(GlancesExport): # Table try: session.execute( - "CREATE TABLE %s (plugin text, time timeuuid, stat map<text,float>, PRIMARY KEY (plugin, time)) WITH CLUSTERING ORDER BY (time DESC)" + "CREATE TABLE %s (plugin text, time timeuuid, stat map<text,float>, PRIMARY KEY (plugin, time)) \ + WITH CLUSTERING ORDER BY (time DESC)" % self.table ) except Exception: @@ -111,7 +112,6 @@ class Export(GlancesExport): # Write input to the Cassandra table try: - stmt = "INSERT INTO {} (plugin, time, stat) VALUES (?, ?, ?)".format(self.table) query = self.session.prepare(stmt) self.session.execute(query, (name, uuid_from_time(datetime.now()), data)) |