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

Add polling and reload callback for extensions. #8789

Merged
merged 6 commits into from
Apr 29, 2023

Conversation

Rucadi
Copy link
Contributor

@Rucadi Rucadi commented Mar 21, 2023

Describe what this pull request is trying to achieve.

Add a polling and reload callback that extensions can use.

Additional notes and description of your changes

I've made a telegram bot extension for Automatic1111 that uses this , I use the polling provided by this PR to poll telegram updates, which simplifies this kind of usage to all extensions.

Environment this was tested in

  • OS: Windows and Linux
  • Browser: Edgium
  • Graphics card: NVIDIA RTX 2080 8GB

Screenshots or videos of your changes

Since it's a functionality to be used by extensions, no videos are provided.

@AUTOMATIC1111
Copy link
Owner

On reload callback is fine (although the demo argument is not needed since you don't use it, and I think it's more reasonable to call it after demo.close()), but the other one should not be there. If you want some periodic events, make a thread and do that there, with whatever interval you like.

@AUTOMATIC1111 AUTOMATIC1111 changed the base branch from master to dev April 29, 2023 16:03
@AUTOMATIC1111 AUTOMATIC1111 merged commit f96e6fb into AUTOMATIC1111:dev Apr 29, 2023
AUTOMATIC1111 added a commit that referenced this pull request Apr 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants