Implemented connection with InfluxDB
This commit is contained in:
13
seaweb.py
13
seaweb.py
@@ -25,9 +25,8 @@ import circularlog
|
||||
import os
|
||||
import signal
|
||||
|
||||
from influxgraph import InfluxGraph
|
||||
|
||||
class InfluxGraph:
|
||||
"""to be imported"""
|
||||
|
||||
try: import simplejson as json
|
||||
except ImportError: import json
|
||||
@@ -597,7 +596,7 @@ class SeaParams:
|
||||
self.values = {}
|
||||
self.consolepos = 0
|
||||
self.id = uuid.uuid4().hex[0:15]
|
||||
SeaGraph.__init__(self)
|
||||
# SeaGraph.__init__(self)
|
||||
self.queue = [dict(type='id', id=self.id, instrument=instrument.inst_name, device=instrument.device)]
|
||||
|
||||
def poll(self):
|
||||
@@ -663,11 +662,15 @@ class SeaParams:
|
||||
|
||||
|
||||
class SeaClient(SeaParams, SeaGraph):
|
||||
pass
|
||||
def __init__(self):
|
||||
SeaParams.__init__(self)
|
||||
SeaGraph.__init__(self)
|
||||
|
||||
|
||||
class SeaInfluxClient(SeaParams, InfluxGraph):
|
||||
pass
|
||||
def __init__(self):
|
||||
SeaParams.__init__(self)
|
||||
InfluxGraph.__init__(self)
|
||||
|
||||
|
||||
class DummyClient(SeaGraph):
|
||||
|
||||
Reference in New Issue
Block a user