| Commit message (Collapse) | Author | Lines | ||
|---|---|---|---|---|
| 2021-01-04 | HelpChannels: fix manual use of lock decorator | -3/+3 | ||
| 2021-01-04 | HelpChannels: fix race condition when unclaiming a channel | -0/+1 | ||
| Place a channel-specific lock on `unclaim_channel`. If both the dormant task and the command simultaneously unclaim a channel, one of them will silently be aborted. Fix #1341 | ||||
| 2021-01-04 | HelpChannels: change caller str parameter to a bool | -11/+12 | ||
| Booleans are less error-prone than strings. | ||||
| 2021-01-04 | HelpChannels: unschedule the dormant task in unclaim_channel | -2/+5 | ||
| Ensure the cancellation will be under the lock once the lock is added. | ||||
| 2021-01-04 | HelpChannels: clarify close command docstring | -2/+1 | ||
| Referencing internal functions in public-facing documentation is not helpful to users. | ||||
| 2021-01-04 | HelpChannels: refactor the close command check | -10/+10 | ||
| 2021-01-04 | HelpChannels: make a channel available within the lock | -5/+6 | ||
| If the lock causes the function to abort, a new channel shouldn't be made available. However, the only way to know it's aborted from the outside would be through a return value or global variable. Neither seem as nice as just just using `create_task` within the lock to avoid having `move_to_available` hold the lock. | ||||
| 2021-01-04 | Add asyncio.create_task wrapper which logs exceptions | -0/+17 | ||
| Normally exceptions are only logged when tasks are garbage collected. This wrapper will allow them to be logged immediately through a done callback. This is similar to how the Scheduler logs errors. | ||||
| 2021-01-04 | HelpChannels: fix race condition between claiming and unclaiming | -1/+15 | ||
| The race condition is when a user claims a channel while their other channel is being unclaimed. Specifically, it's while their cooldown is being removed. The lock ensures that either the cooldown will be re-applied after it's removed or that it won't be removed since `unclaim_channel` will see the user has another claimed channel. | ||||
| 2021-01-04 | Lock: support waiting until a lock is available | -37/+25 | ||
| It's been determined that asyncio.Lock is safe to use in such manner. Therefore, replace LockGuard entirely with asyncio.Lock. | ||||
| 2021-01-04 | HelpChannels: refactor channel unclaiming | -20/+19 | ||
| Narrow the scope of `move_to_dormant` to just moving the channel. Following the design of `claim_channel`, make `unclaim_channel` handle cooldowns and unpinning. | ||||
| 2021-01-04 | HelpChannels: remove obsolete channel position trace log | -1/+0 | ||
| 2021-01-04 | HelpChannels: refactor stat tracking | -27/+47 | ||
| Move significant code related to stats to a separate module. | ||||
| 2021-01-04 | HelpChannels: move function to the channel module | -42/+45 | ||
| 2021-01-04 | HelpChannels: prevent user from claiming multiple channels quickly | -0/+1 | ||
| It's conceivable for a user to be able to quickly send a message in all available channels before the code has a chance to add the cooldown role. Place a lock on the author to prevent the claim code from running multiple times for the same user. | ||||
| 2021-01-04 | HelpChannels: await init task at the start of event listeners | -4/+4 | ||
| It feels safer to do this since the init task moves channels to different categories and the listeners check if channels are in certain categories. | ||||
| 2021-01-04 | HelpChannels: use a more accurate lock for messages | -47/+35 | ||
| Use the `lock_arg` decorator to keep a separate lock for each channel rather than a single lock used by all messages. Separate the core logic in `on_message` into a separate function to facilitate the use of `lock_arg` - not everything in `on_message` needs to be under the lock. | ||||
| 2021-01-02 | Removed 'Optional' import. | -1/+1 | ||
| 2021-01-02 | Removed unnecessary debugging logs. | -2/+0 | ||
| Co-authored-by: Dennis Pham <[email protected]> | ||||
| 2021-01-02 | Set reason to default as an empty string. | -5/+2 | ||
| Co-authored-by: Dennis Pham <[email protected]> | ||||
| 2021-01-02 | No nominaton reason blank replaced by italic None | -2/+4 | ||
| 2021-01-01 | Update discord.py to fix webhook message publishing. | -45/+60 | ||
| Related to #1342. | ||||
| 2020-12-30 | "Pending: False" to "Verified: True" to agree with new semantics. | -1/+1 | ||
| 2020-12-28 | Update raw command no permission error message | -1/+1 | ||
| Co-authored-by: Xithrius <[email protected]> | ||||
| 2020-12-27 | Enable raw command | -2/+2 | ||
| 2020-12-27 | Add check does user can see channel in raw command | -0/+4 | ||
| 2020-12-25 | `!user` command says if user is "Verified" | -2/+2 | ||
| Previously, `!user` said if the user is "Pending", whereas "Verified" is the boolean opposite. | ||||
| 2020-12-24 | `if user.pending` -> `if not user.pending` | -1/+1 | ||
| This was a logic error. This functionality is unfortunately difficult to test outside of production. | ||||
| 2020-12-23 | `ALTERNATE_VERIFIED_MESSAGE`: "You're" -> "You are". | -1/+1 | ||
| 2020-12-23 | Move PEP cog to info extensions category | -0/+0 | ||
| 2020-12-23 | Move constants out from class | -5/+4 | ||
| 2020-12-22 | Rewrite `!verify` to account for new native-gate-only verification. | -10/+11 | ||
| Renamed method; if not `user.pending`, adds and immediately removes an arbitrary role (namely the Announcements role), which verifies the user. | ||||
| 2020-12-20 | Add the clear alias to the clean command | -1/+1 | ||
| 2020-12-20 | Fix wrong way for getting Git SHA | -1/+1 | ||
| 2020-12-20 | Remove unused constant | -1/+0 | ||
| 2020-12-20 | Implement GitHub API authorization header | -1/+9 | ||
| 2020-12-20 | Log warning and return early when can't get PEP URLs from API | -0/+4 | ||
| 2020-12-20 | Make last PEPs listing refresh non-optional | -1/+2 | ||
| 2020-12-20 | Set last PEPs listing at beginning of function | -1/+1 | ||
| 2020-12-20 | Move PEP related functions and command to own cog | -136/+154 | ||
| 2020-12-20 | Add GitHub API key to config as environment variable | -0/+2 | ||
| 2020-12-20 | Remove aiohttp integration | -2/+0 | ||
| 2020-12-20 | Use bot prefix instead pydis-bot for Sentry release workflow | -1/+1 | ||
| 2020-12-20 | Attach release on Sentry SDK initialization | -1/+2 | ||
| 2020-12-20 | Add constant for Git SHA | -0/+3 | ||
| 2020-12-20 | Inject Git SHA in container build workflow | -0/+2 | ||
| 2020-12-20 | Consume Git SHA build arg and add to it to environment | -1/+5 | ||
| 2020-12-19 | Fix flake8 pre-commit hook running through PyCharm | -1/+1 | ||
| 2020-12-19 | Remove obsolete test cases | -8/+0 | ||
| Forgot to remove these when removing `loop_is_running` in a previous commit. | ||||
| 2020-12-19 | APIClient: create the session directly in __init__ | -21/+10 | ||
| The client is already instantiated in a coroutine and aiohttp won't complain. Therefore, scheduling a task to create the session is redundant. | ||||