- pact.HasSchedule with ScheduledCommand and Daily/DailyAt/Every cadences (no River import) - bonfire.Call, Catalog and ErrUnknownCommand for in-process command runs - conga Daily/Every wall-clock schedules in app.timezone, periodic jobs on every worker, scheduled queue (MaxAttempts 1, unique by args within the cadence period) - scheduled worker runs only entries matching the compiled table; unregistered commands are skipped with a Warn log - generated app main publishes bonfire.NewCatalog(commands); hello main regenerated
58 lines
1.5 KiB
Go
58 lines
1.5 KiB
Go
// Code generated by summer build. DO NOT EDIT.
|
|
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"io"
|
|
"os"
|
|
|
|
"git.golem15.com/golem15/summercms/modules/backpack"
|
|
"git.golem15.com/golem15/summercms/modules/bonfire"
|
|
"git.golem15.com/golem15/summercms/modules/cabana"
|
|
"git.golem15.com/golem15/summercms/modules/compass"
|
|
"git.golem15.com/golem15/summercms/modules/conga"
|
|
"git.golem15.com/golem15/summercms/modules/lagoon"
|
|
"git.golem15.com/golem15/summercms/modules/pact"
|
|
"git.golem15.com/golem15/summercms/modules/party"
|
|
"git.golem15.com/golem15/summercms/modules/surf"
|
|
)
|
|
|
|
func main() {
|
|
if err := run(os.Args[1:], os.Stdout); err != nil {
|
|
fmt.Fprintln(os.Stderr, err)
|
|
os.Exit(1)
|
|
}
|
|
}
|
|
|
|
func run(args []string, out io.Writer) error {
|
|
cfg, err := compass.Load("config")
|
|
if err != nil {
|
|
return err
|
|
}
|
|
app := backpack.New(cfg)
|
|
plugins, err := party.Activate(app, PluginIDs)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
commands := lagoon.RuntimeCommands(app, plugins)
|
|
commands = append(commands, conga.RuntimeCommands(app, plugins)...)
|
|
commands = append(commands, surf.ServeCommand(app, plugins))
|
|
commands = append(commands, surf.RouteListCommand(app, plugins))
|
|
commands = append(commands, cabana.RuntimeCommands(app)...)
|
|
for _, plugin := range plugins {
|
|
if hasCommands, ok := plugin.(pact.HasCommands); ok {
|
|
commands = append(commands, hasCommands.Commands()...)
|
|
}
|
|
}
|
|
if err := app.Publish(bonfire.NewCatalog(commands)); err != nil {
|
|
return err
|
|
}
|
|
root, err := bonfire.NewRoot("hello", commands, out)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
root.SetArgs(args)
|
|
return root.Execute()
|
|
}
|