Skip to content

Bot stuck in loop if error occurs in edit/submit post #23

@benja810

Description

@benja810

If a bot receives a non-200 response when attempting to submit or edit a post, the bot will enter a loop in which it continually It appears the issue is with doubleheader games. Something is wrong with the thread title that fails the post. A bot that fails to post/update its thread (in a lemmy sense, not process thread), will enter the death loop i.e. will continuously output a log until it receive a stop signal. Even worse, this doubleheader bug cannot be broken out of the death loop unless the container is retarted

Initial Error Logs:

2023-07-15 12:39:39 PM ::    ERROR :: bot-13-Rays-Bot-game-717411(140691745253120) :: __init__(5321) :: prep_and_post :: Error submitting game thread: {"error":"invalid_post_title"}

2023-07-15 12:39:39 PM ::  WARNING :: bot-13-Rays-Bot-game-717411(140691745253120) :: __init__(5369) :: prep_and_post :: No thread object present. Something went wrong!

Log that will loop until container is restarted:

2023-07-15 12:52:17 PM ::     INFO :: bot-13-Rays-Bot-game-717393(140691728467712) :: __init__(1800) :: game_thread_update_loop :: Waiting for time to submit game 717393 thread: 2023-07-15 17:10:00-04:00 (will hold past post time until doubleheader game 1 (717411) is final). Sleeping for 10 minutes..

We need to investigate this particular thread title to see what's the issue (I wonder if it's a max length issue).

We'll also need to do something to gracefully capture these errors and prevent them from causing the bots to enter into a loop.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions