Refactoring, Bugfix & Updates
+ Refactored all imports + Fixed a bug for the logging regarding removing \n \t \r + Updated to current MGO release + Changed the name of ICCC
This commit is contained in:
1 parent
b50066ef5d
commit
f33f7b5c29
91 files changed
+496
-316
No files matched your search
+8
-6
@@ -1,11 +1,13 @@
|
||||
package NumGen
|
||||
|
||||
import "net/http"
|
||||
import "net/url"
|
||||
import "strconv"
|
||||
import "github.com/SommerEngineering/Ocean/Shutdown"
|
||||
import "github.com/SommerEngineering/Ocean/Log"
|
||||
import LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
||||
import (
|
||||
"github.com/SommerEngineering/Ocean/Log"
|
||||
LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
||||
"github.com/SommerEngineering/Ocean/Shutdown"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func GetNextInt64(name string) (result int64) {
|
||||
result = badNumber64
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package NumGen
|
||||
|
||||
import "fmt"
|
||||
import "net/http"
|
||||
import "github.com/SommerEngineering/Ocean/Shutdown"
|
||||
import "github.com/SommerEngineering/Ocean/Log"
|
||||
import LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/SommerEngineering/Ocean/Log"
|
||||
LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
||||
"github.com/SommerEngineering/Ocean/Shutdown"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func HandlerGetNext(response http.ResponseWriter, request *http.Request) {
|
||||
if Shutdown.IsDown() {
|
||||
|
||||
+8
-6
@@ -1,11 +1,13 @@
|
||||
package NumGen
|
||||
|
||||
import "strings"
|
||||
import "strconv"
|
||||
import "github.com/SommerEngineering/Ocean/Tools"
|
||||
import "github.com/SommerEngineering/Ocean/ConfigurationDB"
|
||||
import "github.com/SommerEngineering/Ocean/Log"
|
||||
import LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
||||
import (
|
||||
"github.com/SommerEngineering/Ocean/ConfigurationDB"
|
||||
"github.com/SommerEngineering/Ocean/Log"
|
||||
LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
||||
"github.com/SommerEngineering/Ocean/Tools"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func init() {
|
||||
Log.LogShort(senderName, LM.CategorySYSTEM, LM.LevelINFO, LM.MessageNameSTARTUP, `Init the number generator.`)
|
||||
|
||||
+6
-4
@@ -1,9 +1,11 @@
|
||||
package NumGen
|
||||
|
||||
import "labix.org/v2/mgo"
|
||||
import "github.com/SommerEngineering/Ocean/CustomerDB"
|
||||
import "github.com/SommerEngineering/Ocean/Log"
|
||||
import LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
||||
import (
|
||||
"github.com/SommerEngineering/Ocean/CustomerDB"
|
||||
"github.com/SommerEngineering/Ocean/Log"
|
||||
LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
||||
"gopkg.in/mgo.v2"
|
||||
)
|
||||
|
||||
func initDB() {
|
||||
Log.LogShort(senderName, LM.CategorySYSTEM, LM.LevelINFO, LM.MessageNameINIT, `Start init of number generator collection.`)
|
||||
|
||||
+7
-5
@@ -1,10 +1,12 @@
|
||||
package NumGen
|
||||
|
||||
import "time"
|
||||
import "labix.org/v2/mgo/bson"
|
||||
import "github.com/SommerEngineering/Ocean/Shutdown"
|
||||
import "github.com/SommerEngineering/Ocean/Log"
|
||||
import LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
||||
import (
|
||||
"github.com/SommerEngineering/Ocean/Log"
|
||||
LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
||||
"github.com/SommerEngineering/Ocean/Shutdown"
|
||||
"gopkg.in/mgo.v2/bson"
|
||||
"time"
|
||||
)
|
||||
|
||||
func producer(name string) {
|
||||
Log.LogShort(senderName, LM.CategorySYSTEM, LM.LevelINFO, LM.MessageNameSTARTUP, `The NumGen producer is now starting.`, `name=`+name)
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package NumGen
|
||||
|
||||
import "github.com/SommerEngineering/Ocean/Shutdown"
|
||||
import "github.com/SommerEngineering/Ocean/Log"
|
||||
import LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
||||
import (
|
||||
"github.com/SommerEngineering/Ocean/Log"
|
||||
LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
||||
"github.com/SommerEngineering/Ocean/Shutdown"
|
||||
)
|
||||
|
||||
func requestChannel4Name(name string) (result chan int64) {
|
||||
|
||||
|
||||
+4
-2
@@ -1,7 +1,9 @@
|
||||
package NumGen
|
||||
|
||||
import "github.com/SommerEngineering/Ocean/Log"
|
||||
import LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
||||
import (
|
||||
"github.com/SommerEngineering/Ocean/Log"
|
||||
LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
||||
)
|
||||
|
||||
type ShutdownFunction struct {
|
||||
}
|
||||
|
||||
+5
-3
@@ -1,8 +1,10 @@
|
||||
package NumGen
|
||||
|
||||
import "sync"
|
||||
import "labix.org/v2/mgo"
|
||||
import LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
||||
import (
|
||||
LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
||||
"gopkg.in/mgo.v2"
|
||||
"sync"
|
||||
)
|
||||
|
||||
var (
|
||||
correctPassword string = ``
|
||||
|
||||
Reference in new issue
Block a user