Do federation wakeup/stop
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
nemunaire 2024-07-25 19:38:02 +02:00
commit 9fa5a378e1
9 changed files with 140 additions and 12 deletions

4
app.go
View file

@ -79,7 +79,7 @@ func (app *App) ResetTimer() {
app.nextAlarm = nil
}
if na, routines, err := reveil.GetNextAlarm(app.cfg, app.db); err == nil && na != nil {
if na, routines, federated, err := reveil.GetNextAlarm(app.cfg, app.db); err == nil && na != nil {
app.nextAlarm = time.AfterFunc(time.Until(*na), func() {
app.nextAlarm = nil
reveil.RemoveOldAlarmsSingle(app.db)
@ -87,7 +87,7 @@ func (app *App) ResetTimer() {
// Rearm timer for the next time
app.ResetTimer()
err := player.WakeUp(app.cfg, routines)
err := player.WakeUp(app.cfg, routines, federated)
if err != nil {
log.Println(err.Error())
return