mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 10:33:11 -06:00
Tweak setup contexts
This commit is contained in:
parent
6650553402
commit
ceb530466f
|
|
@ -23,7 +23,7 @@ func (p *AccountDataStreamProvider) Setup(
|
|||
p.latestMutex.Lock()
|
||||
defer p.latestMutex.Unlock()
|
||||
|
||||
id, err := snapshot.MaxStreamPositionForAccountData(context.Background())
|
||||
id, err := snapshot.MaxStreamPositionForAccountData(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ func (p *InviteStreamProvider) Setup(
|
|||
p.latestMutex.Lock()
|
||||
defer p.latestMutex.Unlock()
|
||||
|
||||
id, err := snapshot.MaxStreamPositionForInvites(context.Background())
|
||||
id, err := snapshot.MaxStreamPositionForInvites(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,10 @@ func (p *NotificationDataStreamProvider) Setup(
|
|||
) {
|
||||
p.DefaultStreamProvider.Setup(ctx, snapshot)
|
||||
|
||||
id, err := snapshot.MaxStreamPositionForNotificationData(context.Background())
|
||||
p.latestMutex.Lock()
|
||||
defer p.latestMutex.Unlock()
|
||||
|
||||
id, err := snapshot.MaxStreamPositionForNotificationData(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func (p *PDUStreamProvider) Setup(
|
|||
p.latestMutex.Lock()
|
||||
defer p.latestMutex.Unlock()
|
||||
|
||||
id, err := snapshot.MaxStreamPositionForPDUs(context.Background())
|
||||
id, err := snapshot.MaxStreamPositionForPDUs(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,10 @@ func (p *PresenceStreamProvider) Setup(
|
|||
) {
|
||||
p.DefaultStreamProvider.Setup(ctx, snapshot)
|
||||
|
||||
id, err := snapshot.MaxStreamPositionForPresence(context.Background())
|
||||
p.latestMutex.Lock()
|
||||
defer p.latestMutex.Unlock()
|
||||
|
||||
id, err := snapshot.MaxStreamPositionForPresence(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,10 @@ func (p *ReceiptStreamProvider) Setup(
|
|||
) {
|
||||
p.DefaultStreamProvider.Setup(ctx, snapshot)
|
||||
|
||||
id, err := snapshot.MaxStreamPositionForReceipts(context.Background())
|
||||
p.latestMutex.Lock()
|
||||
defer p.latestMutex.Unlock()
|
||||
|
||||
id, err := snapshot.MaxStreamPositionForReceipts(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,10 @@ func (p *SendToDeviceStreamProvider) Setup(
|
|||
) {
|
||||
p.DefaultStreamProvider.Setup(ctx, snapshot)
|
||||
|
||||
id, err := snapshot.MaxStreamPositionForSendToDeviceMessages(context.Background())
|
||||
p.latestMutex.Lock()
|
||||
defer p.latestMutex.Unlock()
|
||||
|
||||
id, err := snapshot.MaxStreamPositionForSendToDeviceMessages(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue