[release] v0.9.0-unstable3

This commit is contained in:
Yann Stepienik 2023-07-01 17:06:12 +01:00
parent b58855b428
commit 2185d2be7c
4 changed files with 8 additions and 13 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "cosmos-server", "name": "cosmos-server",
"version": "0.9.0-unstable2", "version": "0.9.0-unstable3",
"description": "", "description": "",
"main": "test-server.js", "main": "test-server.js",
"bugs": { "bugs": {

View file

@ -118,15 +118,10 @@ func checkCerts() {
func CRON() { func CRON() {
go func() { go func() {
gocron.Every(1).Day().At("00:00").Do(checkVersion) s := gocron.NewScheduler()
<-gocron.Start() s.Every(1).Day().At("00:00").Do(checkVersion)
}() s.Every(1).Day().At("01:00").Do(checkCerts)
go func() { s.Every(6).Hours().Do(checkUpdatesAvailable)
gocron.Every(1).Day().At("01:00").Do(checkCerts) s.Start()
<-gocron.Start()
}()
go func() {
gocron.Every(6).Hours().Do(checkUpdatesAvailable)
<-gocron.Start()
}() }()
} }

View file

@ -707,7 +707,7 @@ func CreateService(serviceRequest DockerServiceCreateRequest, OnLog func(string)
// Save the route configs // Save the route configs
config.HTTPConfig.ProxyConfig.Routes = configRoutes config.HTTPConfig.ProxyConfig.Routes = configRoutes
utils.SaveConfigTofile(config) utils.SaveConfigTofile(config)
utils.NeedsRestart = true utils.RestartHTTPServer()
// After all operations // After all operations
utils.Log("CreateService: Operation succeeded. SERVICE STARTED") utils.Log("CreateService: Operation succeeded. SERVICE STARTED")

View file

@ -365,7 +365,7 @@ func InitServer() *mux.Router {
router = proxy.BuildFromConfig(router, HTTPConfig.ProxyConfig) router = proxy.BuildFromConfig(router, HTTPConfig.ProxyConfig)
router.HandleFunc("/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { router.HandleFunc("/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, "/cosmos-ui", http.StatusMovedPermanently) http.Redirect(w, r, "/cosmos-ui", http.StatusTemporaryRedirect)
})) }))