This commit is contained in:
@@ -5,9 +5,16 @@ import (
|
||||
"os"
|
||||
|
||||
"git.front.kjuulh.io/kjuulh/orbis/internal/app"
|
||||
"github.com/joho/godotenv"
|
||||
)
|
||||
|
||||
func main() {
|
||||
err := godotenv.Load()
|
||||
if err != nil {
|
||||
fmt.Printf("%s\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
app := app.NewApp()
|
||||
|
||||
if err := newRoot(app).Execute(); err != nil {
|
||||
|
@@ -1,6 +1,8 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"git.front.kjuulh.io/kjuulh/orbis/internal/app"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
@@ -13,8 +15,13 @@ func newRoot(app *app.App) *cobra.Command {
|
||||
Short: "Orbis is a data workflow scheduler for all your batch and real-time needs",
|
||||
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
ctx := cmd.Context()
|
||||
logger.Info("starting orbis")
|
||||
|
||||
if err := app.Scheduler().Execute(ctx); err != nil {
|
||||
return fmt.Errorf("scheduler failed with error: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user