diff --git a/backfill.go b/backfill.go index 1408987..7e4977e 100644 --- a/backfill.go +++ b/backfill.go @@ -122,6 +122,9 @@ func (user *User) handleBackfillTask(ctx context.Context, task *database.Backfil } func (user *User) BackfillLoop() { + if !user.bridge.Config.Bridge.Backfill.Enabled { + return + } log := user.log.With().Str("action", "backfill loop").Logger() defer func() { log.Debug().Msg("Backfill loop stopped") diff --git a/user.go b/user.go index 5cc4d64..15fd621 100644 --- a/user.go +++ b/user.go @@ -555,6 +555,9 @@ func (user *User) handleTable(tbl *table.LSTable) { } func (user *User) requestMoreInbox(ctx context.Context, itrs []*table.LSUpsertInboxThreadsRange) { + if !user.bridge.Config.Bridge.Backfill.Enabled { + return + } maxInboxPages := user.bridge.Config.Bridge.Backfill.InboxFetchPages if len(itrs) == 0 || user.InboxFetched || maxInboxPages == 0 { return