Code Monkey home page Code Monkey logo

Comments (2)

hobochili avatar hobochili commented on August 29, 2024

Preceding successful commands in channel:

%s 10 puzzle
%h

Bombed on:

%g overfishes

(Issued ~3 min after last successful command in channel)

from discordwordlebot.

hobochili avatar hobochili commented on August 29, 2024

I have found an issue with the lock implementation that will ultimately need to be resolved, however I do not believe that is what is actually behind this particular bug. I've been able to simulate the error message locally simply by adding an async sleep call of 5 seconds in the Wordle.guess function, however in that simulation the bot will still process incoming commands after raising the exception.

My theory right now is that something is hanging and erroring in the ctx.send call, possibly from rate limiting or some kind of connection error. Because of how the lock is implemented as a context manager, if ctx.send throws an exception after the lock has reached its timeout, the HTTP exception will get swallowed.

PR #16 adds a switch to apply the log_level setting globally. Once merged:

  • set log_level to debug and verbose to true, restart the bot, and wait for the issue to emerge.

When it happens again, and before restarting:

  1. check if the game lock exists in redis. The following will output all existing redis keys, which should suffice.
# assuming redis is listening on 127.0.0.1:6379

$ redis-cli -h 127.0.0.1
127.0.0.1:6379> keys *
1) "wordle:server:<server_id>:channel:<channel_id>:game"
2) "wordle:server:<server_id>:channel:<channel_id>:lock"
  1. grab logs
  2. wait at least a few minutes and then try entering some other commands prior to restarting

from discordwordlebot.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.