refactor: remove JobTemplate production code
Remove all JobTemplate model, store, handler, migrations, and wiring. Replaced by Application Definition system. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -21,7 +21,6 @@ import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// App encapsulates the entire application lifecycle.
|
||||
type App struct {
|
||||
cfg *config.Config
|
||||
logger *zap.Logger
|
||||
@@ -142,13 +141,14 @@ func initSlurmClient(cfg *config.Config) (*slurm.Client, error) {
|
||||
func initHTTPServer(cfg *config.Config, db *gorm.DB, slurmClient *slurm.Client, logger *zap.Logger) *http.Server {
|
||||
jobSvc := service.NewJobService(slurmClient, logger)
|
||||
clusterSvc := service.NewClusterService(slurmClient, logger)
|
||||
templateStore := store.NewTemplateStore(db)
|
||||
|
||||
jobH := handler.NewJobHandler(jobSvc, logger)
|
||||
clusterH := handler.NewClusterHandler(clusterSvc, logger)
|
||||
templateH := handler.NewTemplateHandler(templateStore, logger)
|
||||
|
||||
router := server.NewRouter(jobH, clusterH, templateH, logger)
|
||||
appStore := store.NewApplicationStore(db)
|
||||
appSvc := service.NewApplicationService(appStore, jobSvc, cfg.WorkDirBase, logger)
|
||||
appH := handler.NewApplicationHandler(appSvc, logger)
|
||||
|
||||
router := server.NewRouter(jobH, clusterH, appH, logger)
|
||||
|
||||
addr := ":" + cfg.ServerPort
|
||||
|
||||
|
||||
Reference in New Issue
Block a user