2023-07-19 21:31:00 +01:00
|
|
|
package vstp
|
|
|
|
|
|
|
|
import (
|
2024-03-25 11:26:07 +00:00
|
|
|
"git.fjla.uk/owlboard/timetable-mgr/log"
|
2023-07-19 21:31:00 +01:00
|
|
|
"github.com/go-stomp/stomp/v3"
|
2024-04-14 19:03:13 +01:00
|
|
|
"go.uber.org/zap"
|
2023-07-19 21:31:00 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
var count uint64 = 0
|
|
|
|
|
|
|
|
func handle(msg *stomp.Message) {
|
|
|
|
count++
|
2024-04-14 19:03:13 +01:00
|
|
|
log.Info("Message received", zap.Uint64("total since startup", count))
|
2023-07-20 11:07:39 +01:00
|
|
|
schedule := unmarshalData(string(msg.Body))
|
2023-07-21 12:12:16 +01:00
|
|
|
processEntryType(schedule)
|
2023-07-19 21:31:00 +01:00
|
|
|
}
|