Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 19, 2023
1 parent f8fdb24 commit 2d3bea0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions demos/sse/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Server Side Events Demo
This demo visualizes events from `tqdm` during a standard HTTP request.

To start the demo, run:
To start the demo, run:
```bash
python3 test_sse_display_of_tqdm.py
```

This will start a Flask server at http://127.0.0.1:8000/. When started, you can click on Ctrl+Click on the link printed on the console to open that page.

Once the page opens, it should automatically connect to the SSE endpoint (`/events`) and send a request to the `tqdm` endpoint (`/tqdm`). While this is returning, you will see the progress of the `tqdm` instance print as a list on the page.
Once the page opens, it should automatically connect to the SSE endpoint (`/events`) and send a request to the `tqdm` endpoint (`/tqdm`). While this is returning, you will see the progress of the `tqdm` instance print as a list on the page.
3 changes: 1 addition & 2 deletions demos/sse/test_sse_display_of_tqdm.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import sys
import os

SCRIPT_DIR = os.path.dirname(os.path.abspath(os.path.join(__file__, '..','..', 'pyflask')))
SCRIPT_DIR = os.path.dirname(os.path.abspath(os.path.join(__file__, "..", "..", "pyflask")))
sys.path.append(os.path.dirname(SCRIPT_DIR))
from pyflask.sse import MessageAnnouncer

Expand Down Expand Up @@ -40,7 +40,6 @@ async def run_multiple_sleeps(sleep_durations: List[float]) -> List[float]:
return actual_sleep_durations



announcer = MessageAnnouncer()

app = Flask(__name__)
Expand Down

0 comments on commit 2d3bea0

Please sign in to comment.