add filters for courses

This commit is contained in:
2023-12-10 14:24:43 +03:00
parent 3733278d8c
commit a6af4ab4e8
6 changed files with 108 additions and 29 deletions

View File

@ -79,7 +79,8 @@ func (s NextRunStats) String() string {
func (bp *BackgroundProcess) GetNextRunStats() NextRunStats {
out := make(NextRunStats)
if bp.syncSravniHandlerEntryID.Valid() {
sEntry := bp.scheduler.Entry(bp.syncSravniHandlerEntryID.Value())
entryID := bp.syncSravniHandlerEntryID.Value()
sEntry := bp.scheduler.Entry(entryID)
out["sravni_handler"] = sEntry.Next
}
@ -118,11 +119,11 @@ func (bp *BackgroundProcess) registerHandler(ctx context.Context, spec, name str
xcontext.LogInfo(jctx, bp.log, "iteration completed")
}))
var out nullable.Value[cron.EntryID]
if err != nil {
return out, fmt.Errorf("adding %s job: %w", name, err)
return nullable.Value[cron.EntryID]{}, fmt.Errorf("adding %s job: %w", name, err)
}
var out nullable.Value[cron.EntryID]
out.Set(entry)
return out, nil

View File

@ -0,0 +1,3 @@
package http
type Server struct{}

View File

@ -0,0 +1,8 @@
package ports
import "git.loyso.art/frx/kurious/internal/kurious/ports/http"
type Services struct {
HTTP *http.Server
Background *BackgroundProcess
}