Skip to content

Commit

Permalink
Merge pull request #34 from upstash/http-client-fix
Browse files Browse the repository at this point in the history
Make HttpClient Reachable
  • Loading branch information
yunusemreozdemir authored Jan 16, 2025
2 parents dec20f3 + 9ac0053 commit b5e66b1
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
python-version: 3.8

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

- name: Build and publish
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
python-version: 3.8

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

- name: Set up Poetry environment
run: |
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "qstash"
version = "2.0.2"
version = "2.0.3"
description = "Python SDK for Upstash QStash"
license = "MIT"
authors = ["Upstash <[email protected]>"]
Expand Down
2 changes: 1 addition & 1 deletion qstash/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
from qstash.client import QStash
from qstash.receiver import Receiver

__version__ = "2.0.2"
__version__ = "2.0.3"
__all__ = ["QStash", "AsyncQStash", "Receiver"]
18 changes: 9 additions & 9 deletions qstash/asyncio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,31 @@ def __init__(
:param token: The authorization token from the Upstash console.
:param retry: Configures how the client should retry requests.
"""
http = AsyncHttpClient(
self.http = AsyncHttpClient(
token,
retry,
base_url,
)
self.message = AsyncMessageApi(http)
self.message = AsyncMessageApi(self.http)
"""Message api."""

self.url_group = AsyncUrlGroupApi(http)
self.url_group = AsyncUrlGroupApi(self.http)
"""Url group api."""

self.queue = AsyncQueueApi(http)
self.queue = AsyncQueueApi(self.http)
"""Queue api."""

self.schedule = AsyncScheduleApi(http)
self.schedule = AsyncScheduleApi(self.http)
"""Schedule api."""

self.signing_key = AsyncSigningKeyApi(http)
self.signing_key = AsyncSigningKeyApi(self.http)
"""Signing key api."""

self.event = AsyncEventApi(http)
self.event = AsyncEventApi(self.http)
"""Event api."""

self.dlq = AsyncDlqApi(http)
self.dlq = AsyncDlqApi(self.http)
"""Dlq (Dead Letter Queue) api."""

self.chat = AsyncChatApi(http)
self.chat = AsyncChatApi(self.http)
"""Chat api."""
18 changes: 9 additions & 9 deletions qstash/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,31 @@ def __init__(
:param token: The authorization token from the Upstash console.
:param retry: Configures how the client should retry requests.
"""
http = HttpClient(
self.http = HttpClient(
token,
retry,
base_url,
)
self.message = MessageApi(http)
self.message = MessageApi(self.http)
"""Message api."""

self.url_group = UrlGroupApi(http)
self.url_group = UrlGroupApi(self.http)
"""Url group api."""

self.queue = QueueApi(http)
self.queue = QueueApi(self.http)
"""Queue api."""

self.schedule = ScheduleApi(http)
self.schedule = ScheduleApi(self.http)
"""Schedule api."""

self.signing_key = SigningKeyApi(http)
self.signing_key = SigningKeyApi(self.http)
"""Signing key api."""

self.event = EventApi(http)
self.event = EventApi(self.http)
"""Event api."""

self.dlq = DlqApi(http)
self.dlq = DlqApi(self.http)
"""Dlq (Dead Letter Queue) api."""

self.chat = ChatApi(http)
self.chat = ChatApi(self.http)
"""Chat api."""
2 changes: 1 addition & 1 deletion tests/asyncio/test_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async def assertion() -> None:
assertion,
initial_delay=1.0,
retry_delay=1.0,
timeout=10.0,
timeout=60.0,
)


Expand Down
2 changes: 1 addition & 1 deletion tests/test_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def assertion() -> None:
assertion,
initial_delay=1.0,
retry_delay=1.0,
timeout=10.0,
timeout=60.0,
)


Expand Down

0 comments on commit b5e66b1

Please sign in to comment.