Skip to content

Commit

Permalink
Merge pull request #59 from ashilgard/master
Browse files Browse the repository at this point in the history
returning ts
  • Loading branch information
Ryan Lapcevic committed Dec 14, 2016
2 parents 54a938d + cf6f274 commit 1c8173b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/dbserver/dbserver/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from .tsdb_deserialize import *
from .tsdb_error import *

import pdb

LENGTH_FIELD_LENGTH = 4
DBSERVER_HOME = '/var/dbserver/'
Expand Down Expand Up @@ -71,12 +72,12 @@ def data_received(self, data):

def _with_ts(self, TSDBOp):
ids = get_similar_ts_by_id(TSDBOp['ts'], 5, DIR_TS_DATA, DIR_TS_DB)
tslist = [get_ts_from_id(idee).to_json() for idee in ids]
tslist = [self.get_ts_from_id(idee).to_json() for idee in ids]
return TSDBOp_Return(TSDBStatus.OK, TSDBOp, json.dumps(tslist))

def _with_id(self, TSDBOp):
ids = get_similar_ts_by_id(TSDBOp['id'], 5, DIR_TS_DATA, DIR_TS_DB)
tslist = [get_ts_from_id(idee).to_json() for idee in ids]
tslist = [self.get_ts_from_id(idee).to_json() for idee in ids]
return TSDBOp_Return(TSDBStatus.OK, TSDBOp, json.dumps(tslist))

def get_ts_from_id(self, idee):
Expand Down

0 comments on commit 1c8173b

Please sign in to comment.