feat!(backend): unify script run and ad-hoc job run
This commit is contained in:
+4
-2
@@ -96,7 +96,8 @@ func main() {
|
||||
log.Printf("Warning: failed to initialize script interpreters table: %v", err)
|
||||
}
|
||||
scriptSvc := service.NewScriptServiceWithInterpreters(h.Repo, scriptRepo)
|
||||
scriptHandlers := handlers.NewScriptHandlers(scriptSvc, cmdTracker)
|
||||
scriptHandlers := handlers.NewScriptHandlers(scriptSvc, cmdTracker,
|
||||
os.Getenv("WHEREAMI"))
|
||||
jobsHandlers := handlers.NewJobsHandlers(cmdTracker, scriptSvc,
|
||||
os.Getenv("WHEREAMI"), /* our address for redirects */
|
||||
jobRepo,
|
||||
@@ -104,7 +105,8 @@ func main() {
|
||||
|
||||
// Initialize script management service and handlers
|
||||
scriptManageSvc := service.NewScriptService(h.Repo)
|
||||
scriptManageHandlers := handlers.NewScriptHandlersGroup(scriptManageSvc, cmdr)
|
||||
scriptManageHandlers := handlers.NewScriptHandlersGroup(scriptManageSvc, cmdr,
|
||||
os.Getenv("WHEREAMI"))
|
||||
|
||||
agents := handlers.NewAgentsGroup(h, coll)
|
||||
auth := handlers.AuthGroup{Handlers: h}
|
||||
|
||||
Reference in New Issue
Block a user