Fixed relevant stats & license trackers to make it easier to use
This commit is contained in:
@@ -7,7 +7,7 @@ go 1.19
|
||||
require (
|
||||
github.com/docker/docker v23.0.3+incompatible
|
||||
github.com/satori/go.uuid v1.2.0
|
||||
github.com/shuffle/shuffle-shared v0.5.68
|
||||
github.com/shuffle/shuffle-shared v0.5.93
|
||||
k8s.io/api v0.28.1
|
||||
k8s.io/apimachinery v0.28.1
|
||||
k8s.io/client-go v0.28.1
|
||||
|
||||
@@ -361,6 +361,8 @@ github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
|
||||
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
|
||||
github.com/shuffle/shuffle-shared v0.5.68 h1:2ok4SsLojHvFIQMfe2upm3CLEvSbUPMJPIBaBZO1bL8=
|
||||
github.com/shuffle/shuffle-shared v0.5.68/go.mod h1:oIZkx93Z7EvtiTXty7xO+ax63Fjz8MQvjXMxDN0Qws0=
|
||||
github.com/shuffle/shuffle-shared v0.5.93 h1:fZf9s2cEgDoyYXXvPYVeNh8UysuSlywQkc54IXkNL0k=
|
||||
github.com/shuffle/shuffle-shared v0.5.93/go.mod h1:Lg6/+qjQlWzNKwj4/4ATpvScyP2JQGLkTPlNlRM6RJk=
|
||||
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
||||
github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ=
|
||||
|
||||
@@ -1065,26 +1065,10 @@ func getOrborusStats(ctx context.Context) shuffle.OrborusStats {
|
||||
Timestamp: time.Now().Unix(),
|
||||
}
|
||||
|
||||
// FIXME: Returning for now due to this causing network congestion
|
||||
// and database fillup. The backend api also has it disabled.
|
||||
return newStats
|
||||
|
||||
// Disable orborus stats
|
||||
if os.Getenv("SHUFFLE_STATS_DISABLED") == "true" {
|
||||
return newStats
|
||||
}
|
||||
|
||||
|
||||
if swarmConfig == "run" || swarmConfig == "swarm" {
|
||||
if (swarmConfig == "run" || swarmConfig == "swarm") && strings.Contains(newWorkerImage, "scale") {
|
||||
newStats.Swarm = true
|
||||
}
|
||||
|
||||
|
||||
// Run this 1/10 times
|
||||
//if rand.Intn(10) != 1 {
|
||||
// return newStats
|
||||
//}
|
||||
|
||||
newStats.PollTime = sleepTime
|
||||
newStats.MaxQueue = maxConcurrency
|
||||
newStats.Queue = executionCount
|
||||
@@ -1094,6 +1078,15 @@ func getOrborusStats(ctx context.Context) shuffle.OrborusStats {
|
||||
return newStats
|
||||
}
|
||||
|
||||
// Disable orborus stats
|
||||
if os.Getenv("SHUFFLE_STATS_DISABLED") == "true" {
|
||||
return newStats
|
||||
}
|
||||
|
||||
// FIXME: Returning for now due to this causing network congestion
|
||||
// and database fillup. The backend api also has it disabled.
|
||||
return newStats
|
||||
|
||||
// Use the docker API to get the CPU usage of the docker engine machine
|
||||
pers, err := dockercli.Info(ctx)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user