Refactor Export variables

Now the variables are separated by app and other stats were added.
This commit is contained in:
claudemiro
2015-01-13 00:00:34 -03:00
parent cadc72d482
commit ef1070887b
2 changed files with 27 additions and 23 deletions
+4 -2
View File
@@ -11,6 +11,8 @@ import (
"sync"
"time"
"strconv"
log "github.com/golang/glog"
"github.com/gorilla/websocket"
)
@@ -168,14 +170,14 @@ func newID() string {
currentID += 1
return string(currentID)
return strconv.Itoa(currentID)
}
// Create a new Subscriber
func NewSubscriber(socketID string, s *websocket.Conn) *Subscriber {
id := newID()
log.Infof("Creating a new Subscriber %+v with id %d", socketID, id)
log.Infof("Creating a new Subscriber %+v with id %s", socketID, id)
return &Subscriber{Id: id, SocketID: socketID, Socket: s}
}