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

Fix heartbeat in the js client to be Lite compatible #7974

Merged
merged 4 commits into from Apr 10, 2024
Merged

Conversation

whitphx
Copy link
Member

@whitphx whitphx commented Apr 9, 2024

Description

Fixes this error

GET http://localhost:7860/heartbeat/0gcss84krmc5 net::ERR_CONNECTION_REFUSED
CleanShot 2024-04-09 at 16 08 56@2x

`${config.root}/heartbeat/${session_hash}`
);
const heartbeat = EventSource_factory(heartbeat_url);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, this heartbeat variable is not used after the declaration here. Is it ok?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we have to assign it to a variable since we just have to connect to it, we don't have to parse the messages on this channel.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
26fd6da

@gradio-pr-bot
Copy link
Contributor

gradio-pr-bot commented Apr 9, 2024

🪼 branch checks and previews

Name Status URL
Spaces ready! Spaces preview
Website ready! Website preview
🦄 Changes detected! Details

Install Gradio from this PR

pip install https://gradio-builds.s3.amazonaws.com/26fd6daa87d3c48e48d6481c197a2b88fb2b5738/gradio-4.26.0-py3-none-any.whl

Install Gradio Python Client from this PR

pip install "gradio-client @ git+https://github.com/gradio-app/gradio@26fd6daa87d3c48e48d6481c197a2b88fb2b5738#subdirectory=client/python"

@whitphx whitphx added the gradio-lite Related to the @gradio/lite library label Apr 9, 2024
@gradio-pr-bot
Copy link
Contributor

gradio-pr-bot commented Apr 9, 2024

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
@gradio/client patch
gradio patch
  • Maintainers can select this checkbox to manually select packages to update.

With the following changelog entry.

Fix heartbeat in the js client to be Lite compatible

Maintainers or the PR author can modify the PR title to modify this entry.

Something isn't right?

  • Maintainers can change the version label to modify the version bump.
  • If the bot has failed to detect any changes, or if this pull request needs to update multiple packages to different versions or requires a more comprehensive changelog entry, maintainers can update the changelog file directly.

Copy link
Collaborator

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for correcting this @whitphx !

@freddyaboulton freddyaboulton added t: fix A change that implements a fix v: patch A change that requires a patch release labels Apr 9, 2024
@freddyaboulton
Copy link
Collaborator

Just tagged this to be a patch instead of a feature in the changelog

@whitphx whitphx merged commit 79e0aa8 into main Apr 10, 2024
7 checks passed
@whitphx whitphx deleted the lite-heartbeat branch April 10, 2024 14:13
@pngwn pngwn mentioned this pull request Apr 10, 2024
freddyaboulton pushed a commit that referenced this pull request Apr 11, 2024
* Fix heartbeat in the js client to be Lite compatible

* add changeset

* add changeset

* Stop assigning the EventSource instance to a variable at heartbeat

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gradio-lite Related to the @gradio/lite library t: fix A change that implements a fix v: patch A change that requires a patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants