[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",
"version": "0.9.0-unstable2",
"version": "0.9.0-unstable3",
"description": "",
"main": "test-server.js",
"bugs": {

View file

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

View file

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

View file

@ -365,7 +365,7 @@ func InitServer() *mux.Router {
router = proxy.BuildFromConfig(router, HTTPConfig.ProxyConfig)
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)
}))