-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add command to queue packages #203
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
If the Dragonfly API returns a 409, then make another request to check if the package has results already. If it does, then simply display those results. If it doesn't, then that means the package is currently in a "queued" or "pending" state. We can just send a feedback message saying this in this case.
Some suggestions from @import-pandas-as-numpy on Discord:
@import-pandas-as-numpy what do you think about a button on the result message that lets you check if the queued package is done? Something along the lines of a "refresh" button. |
After further discussion, we should also add a background task that would periodically check for this package, and update the message with the new results if it's done. |
Gonna hold off on the background task thing for now, and do that in a separate PR for the sake of getting this merged. |
The class name was changed in a later commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM other than mild changes, though I am not too familiar with discord.py
Instead of creating a new variable `package` assigned to the first item of `scan_results` (or `None` if its' empty), we simply check if the `scan_results` list is not empty - if it's not, use the first item. If it is, display a message to the user. The `package` variable obtained from getting the first item of `scan_results` was unused regardless, so this only made the code harder to read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Closes #151