Add more debug logging for WebSub
All checks were successful
the build was successful

This commit is contained in:
Peter Stuifzand 2018-08-05 21:02:10 +02:00
parent d89dac6159
commit 41c079b871
Signed by: peter
GPG Key ID: 374322D56E5209E8

View File

@ -199,12 +199,15 @@ func (h *hubIncomingBackend) run() error {
for {
select {
case <-ticker.C:
log.Println("Getting feeds for WebSub")
feeds := h.GetFeeds()
for _, feed := range feeds {
log.Printf("Looking at %s\n", feed.URL)
if feed.ResubscribeAt == 0 || time.Now().After(time.Unix(feed.ResubscribeAt, 0)) {
if feed.Callback == "" {
feed.Callback = fmt.Sprintf("%s/incoming/%d", os.Getenv("EKSTER_BASEURL"), feed.ID)
}
log.Printf("Send resubscribe for %s\n", feed.URL)
h.Subscribe(&feed)
}
}