Closed samliew closed 2 years ago
Relevant log when bot restarts:
2022-09-28T02:38:32.372704+00:00 heroku[web.1]: Starting process with command `node dist/bot/index.js`
2022-09-28T02:38:35: [defaults]
2022-09-28T02:38:35: chat domain stackexchange.com;
2022-09-28T02:38:35: chat room 92073;
2022-09-28T02:38:35: use defaults true
2022-09-28T02:38:35:
2022-09-28T02:38:35: [election] scraped https://mathoverflow.net/election/3 at 2022-09-28 02:38:35Z.
2022-09-28T02:38:35: nominees: 2; winners: 0; withdrawals: 1
2022-09-28T02:38:35:
2022-09-28T02:38:36: [election] scraped https://mathoverflow.net/election/2 at 2022-09-28 02:38:36Z.
2022-09-28T02:38:36: nominees: 9; winners: 3; withdrawals: 0
2022-09-28T02:38:36:
2022-09-28T02:38:36: [election] scraped https://mathoverflow.net/election/1 at 2022-09-28 02:38:36Z.
2022-09-28T02:38:36: nominees: 7; winners: 2; withdrawals: 0
2022-09-28T02:38:36:
2022-09-28T02:38:36: [heroku] dynos: web: hobby (1)
2022-09-28T02:38:36:
2022-09-28T02:38:36: INIT - App is in production with active election - redirected to live room:
2022-09-28T02:38:36: DOMAIN: stackexchange.com -> stackexchange.com
2022-09-28T02:38:36: ROOMID: 92073 -> 139319
2022-09-28T02:38:36:
2022-09-28T02:38:36: [room owners] room 139319 (stackexchange.com)
2022-09-28T02:38:36: 139041 - Catija
2022-09-28T02:38:36:
2022-09-28T02:38:38: INIT - Logged in to stackexchange.com as ElectionBot (402338)
2022-09-28T02:38:38:
2022-09-28T02:38:38: [cron] initialized "end" task 0 20 4 10 *
2022-09-28T02:38:38:
2022-09-28T02:38:38: [cron] past "nomination" task timestamp: Mon Sep 19 2022 20:00:00 GMT+0000 (Coordinated Universal Time)
2022-09-28T02:38:38:
2022-09-28T02:38:38: [cron] invalid "primary" task timestamp: undefined
2022-09-28T02:38:38:
2022-09-28T02:38:38: [cron] past "start" task timestamp: Mon Sep 26 2022 20:00:00 GMT+0000 (Coordinated Universal Time)
2022-09-28T02:38:38:
2022-09-28T02:38:38: [init] scheduled tasks init:
2022-09-28T02:38:38: end: 0 20 4 10 *
2022-09-28T02:38:38: nomination: not initialized
2022-09-28T02:38:38: primary: not initialized
2022-09-28T02:38:38: start: not initialized
2022-09-28T02:38:38:
2022-09-28T02:38:38: [transcript] fetching https://chat.stackexchange.com/transcript/139319/2022/9/28
2022-09-28T02:38:38:
2022-09-28T02:38:39: [transcript] fetching https://chat.stackexchange.com/transcript/139319/2022/9/27
2022-09-28T02:38:39:
2022-09-28T02:38:39: [transcript] fetching https://chat.stackexchange.com/transcript/139319/2022/9/26
2022-09-28T02:38:39:
2022-09-28T02:38:40: [bot activity] previous bot message
2022-09-28T02:38:40: timestamp: 1664231220000
2022-09-28T02:38:40: message: "**Attention:** Candidate [zeraoulia rafik](https://mathoverflow.net/posts/430812/revisions) has withdrawn from the election."
2022-09-28T02:38:40:
2022-09-28T02:38:40: [chat search] room 139319 (stackexchange.com)
2022-09-28T02:38:40: query: "We have a new nomination Please welcome our latest candidate"
2022-09-28T02:38:40:
2022-09-28T02:38:42: [init] added announced: 0 withdrawn, 2 nominated
2022-09-28T02:38:42:
2022-09-28T02:38:42: [chat search] room 139319 (stackexchange.com)
2022-09-28T02:38:42: query: "moderator election results"
2022-09-28T02:38:42:
2022-09-28T02:38:42: [success] started https://electionbot2.samliew.com (port 19611)
2022-09-28T02:38:42:
2022-09-28T02:38:42: [server] started
2022-09-28T02:38:42: dirname /app/dist/server
2022-09-28T02:38:42: partials /app/dist/server/views/partials
2022-09-28T02:38:42: static /app/dist/server/static
2022-09-28T02:38:42: views /app/dist/server/views
2022-09-28T02:38:42: port 19611
2022-09-28T02:38:42:
2022-09-28T02:38:42: INIT - Joined and listening in room https://chat.stackexchange.com/rooms/139319
2022-09-28T02:38:42:
2022-09-28T02:38:42.1]: State changed from starting to up
2022-09-28T02:40:38: [cron] past "start" task timestamp: Mon Sep 26 2022 20:00:00 GMT+0000 (Coordinated Universal Time)
2022-09-28T02:40:38:
2022-09-28T02:40:38: [rescraper] election start task start: false
2022-09-28T02:40:38:
2022-09-28T02:40:38: [election] scraped https://mathoverflow.net/election/3 at 2022-09-28 02:40:38Z.
2022-09-28T02:40:38: nominees: 2; winners: 0; withdrawals: 1
2022-09-28T02:40:38:
2022-09-28T02:40:38: [valid response]
2022-09-28T02:40:38: response text: **Attention:** Candidate [zeraoulia rafik](https://mathoverflow.net/posts/430812/revisions) has withdrawn from the election.
2022-09-28T02:40:38: response chars: 124
2022-09-28T02:40:38: last message: 1664231220000
2022-09-28T02:40:38: last activity: 1664231220000
2022-09-28T02:40:38:
2022-09-28T02:40:38: [rescraper] announced withdrawn: true
2022-09-28T02:40:38:
2022-09-28T02:40:38: [rescraper] activity greeting
2022-09-28T02:40:38: { canIdleGreet: false, canBusyGreet: false }
Probably need to do a chat search for withdrawn nomination announcements, similar to new nominations (which is why it won't reannounce nominations on bot restart)
This line should be 1 withdrawn but 0:
2022-09-28T02:38:42: [init] added announced: 0 withdrawn, 2 nominated
When the bot restarts, a previously announced withdrawal was announced again.
Example: