Move cron to drupal page

This commit is contained in:
Tom Wiesing 2023-11-10 20:23:55 +01:00
parent 7c544d9ae4
commit 7fefb689c7
No known key found for this signature in database
9 changed files with 61 additions and 41 deletions

View file

@ -71,7 +71,11 @@ type LastRebuildFetcher struct {
}
}
func (lbr *LastRebuildFetcher) Fetch(ctx context.Context, flags ingredient.FetcherFlags, info *status.WissKI) (err error) {
info.LastRebuild, _ = lbr.dependencies.Barrel.LastRebuild(ctx)
var (
_ ingredient.WissKIFetcher = (*LastRebuildFetcher)(nil)
)
func (lbr *LastRebuildFetcher) Fetch(flags ingredient.FetcherFlags, info *status.WissKI) (err error) {
info.LastRebuild, _ = lbr.dependencies.Barrel.LastRebuild(flags.Context)
return
}

View file

@ -55,6 +55,6 @@ func (lbr *LastCronFetcher) Fetch(flags ingredient.FetcherFlags, info *status.Wi
return
}
info.LastRebuild, _ = lbr.dependencies.Drush.LastCron(flags.Context, flags.Server)
info.LastCron, _ = lbr.dependencies.Drush.LastCron(flags.Context, flags.Server)
return
}

View file

@ -143,7 +143,7 @@ func (wisski *WissKI) Theme() *extras.Theme {
// THESE SHOULD NEVER BE CALLED DIRECTLY
//
func (wisski *WissKI) allIngredients(context *lifetime.RegisterContext[ingredient.Ingredient, *liquid.Liquid]) {
func (wisski *WissKI) allIngredients(context *lifetime.Registry[ingredient.Ingredient, *liquid.Liquid]) {
// core bits
lifetime.Place[*locker.Locker](context)
lifetime.Register(context, func(m *mstore.MStore, _ *liquid.Liquid) {