This commit is contained in:
Kevin Cotugno 2017-09-24 22:23:13 -07:00
parent 04c17fc7b3
commit c6289f8f56
6 changed files with 12 additions and 12 deletions

View File

@ -15,5 +15,5 @@ func main() {
}
t := make(chan bool)
<- t
<-t
}

View File

@ -1,10 +1,10 @@
package main
import (
"log"
"github.com/kcotugno/tacitus/http"
"github.com/kcotugno/tacitus/postgres"
"github.com/kcotugno/tacitus/osutil"
"github.com/kcotugno/tacitus/postgres"
"log"
)
func main() {
@ -23,5 +23,5 @@ func main() {
defer s.Close()
s.Open()
<- s.Err
<-s.Err
}

View File

@ -16,9 +16,9 @@ type ListenerService struct {
subs []string
closed bool
closed bool
shouldRestart bool
restMu sync.Mutex
restMu sync.Mutex
}
func (s *ListenerService) Open() error {

View File

@ -1,8 +1,8 @@
package websocket
import (
"github.com/kcotugno/tacitus/gdax"
"github.com/gorilla/websocket"
"github.com/kcotugno/tacitus/gdax"
"sync"
"time"

View File

@ -48,9 +48,9 @@ func (r *Registrar) SetLogger(logger tacitus.Logger) {
}
func (r *Registrar) record() {
go func () {
go func() {
for t := range r.wc.Stream() {
go func (trade tacitus.Trade) {
go func(trade tacitus.Trade) {
_, err := r.db.TradeService().CreateTrade(trade)
if err != nil {
r.logger.Info("Error inserting trade: %v", err)
@ -59,7 +59,7 @@ func (r *Registrar) record() {
}
}()
go func () {
go func() {
for err := range r.wc.Error() {
r.logger.Info("Registrar received error: %v", err)
}

View File

@ -11,10 +11,10 @@ const tmpl = "%v - %v: "
type LoggerService struct {
DateFormat string
Utc bool
Utc bool
file *os.File
log bool
log bool
}
func NewLogger() *LoggerService {