Add YAML scheduler core and run logs

This commit is contained in:
mixeme
2026-06-14 22:45:11 +03:00
parent 0a66d9da0e
commit 4c11bb4f06
10 changed files with 793 additions and 99 deletions
+35
View File
@@ -0,0 +1,35 @@
package core
import (
"os"
"path/filepath"
)
const (
ConfigFileName = "pysentry.yaml"
JobsFileName = "jobs.yaml"
)
type Paths struct {
AppDir string
ConfigPath string
JobsDir string
JobsPath string
LogsDir string
}
func ResolvePaths() (Paths, error) {
executable, err := os.Executable()
if err != nil {
return Paths{}, err
}
appDir := filepath.Dir(executable)
configPath := filepath.Join(appDir, ConfigFileName)
return Paths{
AppDir: appDir,
ConfigPath: configPath,
JobsDir: appDir,
JobsPath: filepath.Join(appDir, JobsFileName),
}, nil
}