Do federation wakeup/stop
This commit is contained in:
parent
435d1d8f98
commit
9fa5a378e1
9 changed files with 140 additions and 12 deletions
4
app.go
4
app.go
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue