Skip to content
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

[tasks] Add way to change interval at run-time #2162

Merged
merged 3 commits into from May 17, 2019

Conversation

@Suhail6inkling
Copy link
Contributor

commented May 16, 2019

Summary

This pull request fixes #2158 by creating a create_interval method for a Loop, allowing the interval to be changed at run-time

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)
@Phxntxm

This comment has been minimized.

Copy link
Contributor

commented May 16, 2019

Should __init__ simply call this method to remove code duplication?

@Rapptz Rapptz added this to the v1.2 milestone May 16, 2019

@Rapptz
Copy link
Owner

left a comment

__init__ should probably use this.

@Suhail6inkling

This comment has been minimized.

Copy link
Contributor Author

commented May 17, 2019

Altered init

@Rapptz
Copy link
Owner

left a comment

Looks good. Just a few wording nits.

Show resolved Hide resolved discord/ext/tasks/__init__.py Outdated
Show resolved Hide resolved discord/ext/tasks/__init__.py Outdated
Show resolved Hide resolved discord/ext/tasks/__init__.py Outdated
Show resolved Hide resolved discord/ext/tasks/__init__.py Outdated
[tasks] Correct documentation for new Loop.change_interval method
Co-Authored-By: Danny <Rapptz@users.noreply.github.com>
@Suhail6inkling

This comment has been minimized.

Copy link
Contributor Author

commented May 17, 2019

Corrected

@Rapptz

Rapptz approved these changes May 17, 2019

@Rapptz

This comment has been minimized.

Copy link
Owner

commented May 17, 2019

Thanks

@Rapptz Rapptz merged commit aadb695 into Rapptz:master May 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.