Skip to content

Commit b5e66b1

Browse files
Merge pull request #34 from upstash/http-client-fix
Make HttpClient Reachable
2 parents dec20f3 + 9ac0053 commit b5e66b1

File tree

8 files changed

+24
-24
lines changed

8 files changed

+24
-24
lines changed

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
python-version: 3.8
1717

1818
- name: Install Poetry
19-
run: curl -sSL https://install.python-poetry.org | python3 -
19+
run: curl -sSL https://install.python-poetry.org | python3 - --version 1.8.4
2020

2121
- name: Build and publish
2222
run: |

.github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
python-version: 3.8
2424

2525
- name: Install Poetry
26-
run: curl -sSL https://install.python-poetry.org | python3 -
26+
run: curl -sSL https://install.python-poetry.org | python3 - --version 1.8.4
2727

2828
- name: Set up Poetry environment
2929
run: |

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "qstash"
3-
version = "2.0.2"
3+
version = "2.0.3"
44
description = "Python SDK for Upstash QStash"
55
license = "MIT"
66
authors = ["Upstash <[email protected]>"]

qstash/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
from qstash.client import QStash
33
from qstash.receiver import Receiver
44

5-
__version__ = "2.0.2"
5+
__version__ = "2.0.3"
66
__all__ = ["QStash", "AsyncQStash", "Receiver"]

qstash/asyncio/client.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,31 @@ def __init__(
2424
:param token: The authorization token from the Upstash console.
2525
:param retry: Configures how the client should retry requests.
2626
"""
27-
http = AsyncHttpClient(
27+
self.http = AsyncHttpClient(
2828
token,
2929
retry,
3030
base_url,
3131
)
32-
self.message = AsyncMessageApi(http)
32+
self.message = AsyncMessageApi(self.http)
3333
"""Message api."""
3434

35-
self.url_group = AsyncUrlGroupApi(http)
35+
self.url_group = AsyncUrlGroupApi(self.http)
3636
"""Url group api."""
3737

38-
self.queue = AsyncQueueApi(http)
38+
self.queue = AsyncQueueApi(self.http)
3939
"""Queue api."""
4040

41-
self.schedule = AsyncScheduleApi(http)
41+
self.schedule = AsyncScheduleApi(self.http)
4242
"""Schedule api."""
4343

44-
self.signing_key = AsyncSigningKeyApi(http)
44+
self.signing_key = AsyncSigningKeyApi(self.http)
4545
"""Signing key api."""
4646

47-
self.event = AsyncEventApi(http)
47+
self.event = AsyncEventApi(self.http)
4848
"""Event api."""
4949

50-
self.dlq = AsyncDlqApi(http)
50+
self.dlq = AsyncDlqApi(self.http)
5151
"""Dlq (Dead Letter Queue) api."""
5252

53-
self.chat = AsyncChatApi(http)
53+
self.chat = AsyncChatApi(self.http)
5454
"""Chat api."""

qstash/client.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -25,31 +25,31 @@ def __init__(
2525
:param token: The authorization token from the Upstash console.
2626
:param retry: Configures how the client should retry requests.
2727
"""
28-
http = HttpClient(
28+
self.http = HttpClient(
2929
token,
3030
retry,
3131
base_url,
3232
)
33-
self.message = MessageApi(http)
33+
self.message = MessageApi(self.http)
3434
"""Message api."""
3535

36-
self.url_group = UrlGroupApi(http)
36+
self.url_group = UrlGroupApi(self.http)
3737
"""Url group api."""
3838

39-
self.queue = QueueApi(http)
39+
self.queue = QueueApi(self.http)
4040
"""Queue api."""
4141

42-
self.schedule = ScheduleApi(http)
42+
self.schedule = ScheduleApi(self.http)
4343
"""Schedule api."""
4444

45-
self.signing_key = SigningKeyApi(http)
45+
self.signing_key = SigningKeyApi(self.http)
4646
"""Signing key api."""
4747

48-
self.event = EventApi(http)
48+
self.event = EventApi(self.http)
4949
"""Event api."""
5050

51-
self.dlq = DlqApi(http)
51+
self.dlq = DlqApi(self.http)
5252
"""Dlq (Dead Letter Queue) api."""
5353

54-
self.chat = ChatApi(http)
54+
self.chat = ChatApi(self.http)
5555
"""Chat api."""

tests/asyncio/test_message.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ async def assertion() -> None:
3535
assertion,
3636
initial_delay=1.0,
3737
retry_delay=1.0,
38-
timeout=10.0,
38+
timeout=60.0,
3939
)
4040

4141

tests/test_message.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def assertion() -> None:
3131
assertion,
3232
initial_delay=1.0,
3333
retry_delay=1.0,
34-
timeout=10.0,
34+
timeout=60.0,
3535
)
3636

3737

0 commit comments

Comments
 (0)