From faa070bbc22f22f2bbf95c4e054d4d38dd8198d6 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Tue, 8 Sep 2020 14:07:59 +0100 Subject: [PATCH] Don't panic --- syncapi/consumers/roomserver.go | 2 +- syncapi/sync/provider.go | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 syncapi/sync/provider.go diff --git a/syncapi/consumers/roomserver.go b/syncapi/consumers/roomserver.go index 6379c5f6..404f28b9 100644 --- a/syncapi/consumers/roomserver.go +++ b/syncapi/consumers/roomserver.go @@ -170,7 +170,7 @@ func (s *OutputRoomEventConsumer) onNewRoomEvent( } if pduPos, err = s.notifyJoinedPeeks(ctx, &ev, pduPos); err != nil { - logrus.WithError(err).Panicf("Failed to notifyJoinedPeeks for PDU pos %d", pduPos) + logrus.WithError(err).Errorf("Failed to notifyJoinedPeeks for PDU pos %d", pduPos) return err } diff --git a/syncapi/sync/provider.go b/syncapi/sync/provider.go new file mode 100644 index 00000000..fd8bfe03 --- /dev/null +++ b/syncapi/sync/provider.go @@ -0,0 +1,11 @@ +package sync + +import "github.com/matrix-org/dendrite/syncapi/types" + +type SyncProvider interface { + WaitFor() +} + +type SyncStream interface { + GetLatestPosition() types.StreamPosition +}