hackclub / sinerider

💖 A game about love and graphing, built by teenagers.
https://sinerider.com
GNU Affero General Public License v3.0
548 stars 46 forks source link

Sinerider Twitter bot stops polling for new posts on Twitter #575

Open grymmy opened 1 year ago

grymmy commented 1 year ago

Description

It seems as though the Twitter bot gets stuck occasionally and the thread that is supposed to monitor for new submissions fails to run correctly.

When in its failure mode, the log output looks like the following:

2023-07-10T17:15:33.597624+00:00 app[worker.1]: refreshed auth token for client id aDA3YkhCdTJtTlBNMGxDQkJld0E6MTpjaQ
2023-07-10T17:15:34.313128+00:00 app[worker.1]: refreshed auth token for client id cEF0YU9XZHIyWEZ3TmZUalFRMHc6MTpjaQ
2023-07-10T17:15:40.069237+00:00 app[worker.1]: Processing work queue
2023-07-10T17:15:40.127342+00:00 app[worker.1]: PRE asyncio.gather
2023-07-10T17:15:40.127346+00:00 app[worker.1]: POST asyncio.gather
2023-07-10T17:15:40.127354+00:00 app[worker.1]: Work queue end
2023-07-10T17:15:50.127841+00:00 app[worker.1]: Processing work queue
2023-07-10T17:15:50.262978+00:00 app[worker.1]: PRE asyncio.gather
2023-07-10T17:15:50.262993+00:00 app[worker.1]: POST asyncio.gather
2023-07-10T17:15:50.262993+00:00 app[worker.1]: Work queue end
2023-07-10T17:16:00.263569+00:00 app[worker.1]: Processing work queue
2023-07-10T17:16:00.348572+00:00 app[worker.1]: PRE asyncio.gather
2023-07-10T17:16:00.348656+00:00 app[worker.1]: POST asyncio.gather
2023-07-10T17:16:00.348681+00:00 app[worker.1]: Work queue end
2023-07-10T17:16:10.349265+00:00 app[worker.1]: Processing work queue
2023-07-10T17:16:10.434381+00:00 app[worker.1]: PRE asyncio.gather
2023-07-10T17:16:10.434391+00:00 app[worker.1]: POST asyncio.gather
2023-07-10T17:16:10.434392+00:00 app[worker.1]: Work queue end
2023-07-10T17:16:20.434860+00:00 app[worker.1]: Processing work queue
2023-07-10T17:16:20.523194+00:00 app[worker.1]: PRE asyncio.gather
2023-07-10T17:16:20.523244+00:00 app[worker.1]: POST asyncio.gather
2023-07-10T17:16:20.523245+00:00 app[worker.1]: Work queue end
2023-07-10T17:16:30.523883+00:00 app[worker.1]: Processing work queue
2023-07-10T17:16:30.618178+00:00 app[worker.1]: PRE asyncio.gather
2023-07-10T17:16:30.618184+00:00 app[worker.1]: POST asyncio.gather

When functioning as desired (healthily), the logs look like the following:


2023-07-10T17:18:43.889810+00:00 app[worker.1]: POST asyncio.gather
2023-07-10T17:18:43.889811+00:00 app[worker.1]: Work queue end
2023-07-10T17:18:46.155214+00:00 app[worker.1]: refreshed auth token for client id aDA3YkhCdTJtTlBNMGxDQkJld0E6MTpjaQ
2023-07-10T17:18:46.789633+00:00 app[worker.1]: refreshed auth token for client id cEF0YU9XZHIyWEZ3TmZUalFRMHc6MTpjaQ
2023-07-10T17:18:53.336471+00:00 app[worker.1]: Polling Twitter for submissions...
2023-07-10T17:18:53.547232+00:00 app[worker.1]: Done polling Twitter!
2023-07-10T17:18:53.547235+00:00 app[worker.1]: New submissions: 0
2023-07-10T17:18:53.890316+00:00 app[worker.1]: Processing work queue
2023-07-10T17:18:53.957026+00:00 app[worker.1]: PRE asyncio.gather
2023-07-10T17:18:53.957035+00:00 app[worker.1]: POST asyncio.gather
2023-07-10T17:18:53.957036+00:00 app[worker.1]: Work queue end
2023-07-10T17:19:03.957588+00:00 app[worker.1]: Processing work queue
2023-07-10T17:19:04.033485+00:00 app[worker.1]: PRE asyncio.gather
2023-07-10T17:19:04.033491+00:00 app[worker.1]: POST asyncio.gather
2023-07-10T17:19:04.033491+00:00 app[worker.1]: Work queue end
2023-07-10T17:19:09.624784+00:00 app[worker.1]: Polling Twitter for submissions...
2023-07-10T17:19:09.849183+00:00 app[worker.1]: Done polling Twitter!
2023-07-10T17:19:09.849187+00:00 app[worker.1]: New submissions: 0
2023-07-10T17:19:14.034000+00:00 app[worker.1]: Processing work queue
2023-07-10T17:19:14.113383+00:00 app[worker.1]: PRE asyncio.gather
2023-07-10T17:19:14.113397+00:00 app[worker.1]: POST asyncio.gather
2023-07-10T17:19:14.113398+00:00 app[worker.1]: Work queue end
2023-07-10T17:19:24.113893+00:00 app[worker.1]: Processing work queue
2023-07-10T17:19:24.188937+00:00 app[worker.1]: PRE asyncio.gather
2023-07-10T17:19:24.188947+00:00 app[worker.1]: POST asyncio.gather
2023-07-10T17:19:24.188948+00:00 app[worker.1]: Work queue end
2023-07-10T17:19:25.927746+00:00 app[worker.1]: Polling Twitter for submissions...
2023-07-10T17:19:26.176636+00:00 app[worker.1]: Done polling Twitter!
2023-07-10T17:19:26.176641+00:00 app[worker.1]: New submissions: 0
2023-07-10T17:19:34.189443+00:00 app[worker.1]: Processing work queue
2023-07-10T17:19:34.361954+00:00 app[worker.1]: PRE asyncio.gather

Screenshots

No response

Additional information

No response