Fix issue where bot eventually stops replying once it encounters an error

This commit is contained in:
Elara 2023-11-17 16:16:38 +00:00
parent aa337e4eed
commit 976c6c130c

View File

@ -289,7 +289,7 @@ func commentReplyWorker(ctx context.Context, c *lemmy.Client, rs *store.Queries,
}) })
if err != nil { if err != nil {
log.Warn("Error while trying to edit comment").Err(err).Send() log.Warn("Error while trying to edit comment").Err(err).Send()
return continue
} }
// Set the reply ID for the post/comment in the database // Set the reply ID for the post/comment in the database
@ -300,7 +300,7 @@ func commentReplyWorker(ctx context.Context, c *lemmy.Client, rs *store.Queries,
}) })
if err != nil { if err != nil {
log.Warn("Error setting the reply ID of the new comment").Err(err).Send() log.Warn("Error setting the reply ID of the new comment").Err(err).Send()
return continue
} }
log.Info("Edited comment"). log.Info("Edited comment").
@ -315,7 +315,7 @@ func commentReplyWorker(ctx context.Context, c *lemmy.Client, rs *store.Queries,
}) })
if err != nil { if err != nil {
log.Warn("Error while trying to create new comment").Err(err).Send() log.Warn("Error while trying to create new comment").Err(err).Send()
return continue
} }
// Set the reply ID for the post/comment in the database // Set the reply ID for the post/comment in the database
@ -326,7 +326,7 @@ func commentReplyWorker(ctx context.Context, c *lemmy.Client, rs *store.Queries,
}) })
if err != nil { if err != nil {
log.Warn("Error setting the reply ID of the new comment").Err(err).Send() log.Warn("Error setting the reply ID of the new comment").Err(err).Send()
return continue
} }
log.Info("Created new comment"). log.Info("Created new comment").