Fix validator bugs
This commit is contained in:
parent
b1b12ac06e
commit
7a1e1fd8d8
@ -20,6 +20,10 @@ CREATE TABLE confirmations (
|
||||
type CHAR(1) NOT NULL,
|
||||
last_id INTEGER NOT NULL DEFAULT 0);
|
||||
|
||||
CREATE UNIQUE INDEX confirmations_product_type_index ON confirmations (
|
||||
product,
|
||||
type);
|
||||
|
||||
CREATE TABLE aggregations (
|
||||
id SERIAL PRIMARY KEY,
|
||||
interval integer NOT NULL,
|
||||
|
@ -50,7 +50,7 @@ func (a *AggregationValidator) Stop() {
|
||||
|
||||
func (a *AggregationValidator) emitProducts() {
|
||||
for _, p := range a.Products {
|
||||
go a.validate(p)
|
||||
a.validate(p)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ const (
|
||||
trade_product = `SELECT DISTINCT product FROM trades;`
|
||||
trade_after_all = `SELECT id,` + trade_columns + `FROM trades WHERE product = $1 ` +
|
||||
`AND trade_id >= $2 ORDER BY trade_id ASC;`
|
||||
trade_where = `SELECT id, ` + trade_columns + `WHERE`
|
||||
trade_where = `SELECT id,` + trade_columns + `FROM trades WHERE`
|
||||
)
|
||||
|
||||
type TradeService struct {
|
||||
@ -163,7 +163,7 @@ func (s *TradeService) TradesWhere(sql string, params ...interface{}) ([]tacitus
|
||||
|
||||
s.client.logQuery(stmt, params...)
|
||||
|
||||
rows, err := s.client.db.Query(stmt, params)
|
||||
rows, err := s.client.db.Query(stmt, params...)
|
||||
if err != nil {
|
||||
s.client.logError(stmt, err, params...)
|
||||
|
||||
|
Reference in New Issue
Block a user