Skip to content

Add polling and reload callback for extensions.#8789

Merged
AUTOMATIC1111 merged 6 commits into
AUTOMATIC1111:devfrom
Rucadi:master
Apr 29, 2023
Merged

Add polling and reload callback for extensions.#8789
AUTOMATIC1111 merged 6 commits into
AUTOMATIC1111:devfrom
Rucadi:master

Conversation

@Rucadi

@Rucadi Rucadi commented Mar 21, 2023

Copy link
Copy Markdown
Contributor

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.

@Rucadi Rucadi requested a review from AUTOMATIC1111 as a code owner March 21, 2023 17:44
@AUTOMATIC1111

Copy link
Copy Markdown
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