Browse Source

fix: update model version

master
shenjiachi 22 hours ago
parent
commit
c022be71c0
3 changed files with 23 additions and 1 deletions
  1. +2
    -0
      app/task/svc/svc_egg_energy_auto_update_user_access_test.go
  2. +20
    -0
      app/task/svc/svc_egg_energy_automatic_scoring_test.go
  3. +1
    -1
      go.mod

+ 2
- 0
app/task/svc/svc_egg_energy_auto_update_user_access_test.go View File

@@ -3,6 +3,7 @@ package svc
import (
"applet/app/cfg"
"applet/app/db"
"applet/app/utils/cache"
"code.fnuoos.com/go_rely_warehouse/zyos_go_es.git/es"
"testing"
)
@@ -20,6 +21,7 @@ func TestEggEnergyAutoUpdateUserAccess(t *testing.T) {
Path: "tmp/%s.log",
}
db.InitDB(&dbcfg)
cache.NewRedis("127.0.0.1:6379")
es.Init("http://123.57.140.192:9200/", "elastic", "fnuo123")
EggEnergyAutoUpdateUserAccess(db.Db)
}

+ 20
- 0
app/task/svc/svc_egg_energy_automatic_scoring_test.go View File

@@ -0,0 +1,20 @@
package svc

import (
"code.fnuoos.com/EggPlanet/egg_system_rules.git/md"
"code.fnuoos.com/go_rely_warehouse/zyos_go_es.git/es"
"fmt"
"testing"
)

func TestCreateEsIndex(t *testing.T) {
es.Init("http://120.55.48.175:9200", "elastic", "fnuo123")
nextWeekIndex := "egg_energy_user_egg_score_202452"
for {
err := es.CreateIndexIfNotExists(nextWeekIndex, md.EggEnergyUserEggScoreEsMapping)
if err != nil {
fmt.Println(err)
return
}
}
}

+ 1
- 1
go.mod View File

@@ -33,7 +33,7 @@ require (
)

require (
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241226101244-5f1b738cf2bb
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241227062700-67d240c3bcb3
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241226101642-a072d33f3449
code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20241118083738-0f22da9ba0be
code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5


Loading…
Cancel
Save