Skip to content

Commit 35351ff

Browse files
fix: retries option in serve (#31)
1 parent 23cb727 commit 35351ff

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

pyproject.toml

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

upstash_workflow/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.1.0"
1+
__version__ = "0.1.1"
22

33
from upstash_workflow.context.context import WorkflowContext
44
from upstash_workflow.serve.serve import serve

upstash_workflow/asyncio/context/context.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def __init__(
5858
self.headers: Dict[str, str] = headers
5959
self.request_payload: TInitialPayload = initial_payload
6060
self.env: Dict[str, Optional[str]] = env or {}
61-
self.retries: int = retries or DEFAULT_RETRIES
61+
self.retries: int = DEFAULT_RETRIES if retries is None else retries
6262
self._executor: _AutoExecutor = _AutoExecutor(self, self._steps)
6363

6464
async def run(

upstash_workflow/asyncio/serve/options.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def _initial_payload_parser(initial_request: str) -> TInitialPayload:
9292
),
9393
base_url=base_url or environment.get("UPSTASH_WORKFLOW_URL"),
9494
env=environment,
95-
retries=retries or DEFAULT_RETRIES,
95+
retries=DEFAULT_RETRIES if retries is None else retries,
9696
url=url,
9797
)
9898

upstash_workflow/context/context.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def __init__(
5757
self.headers: Dict[str, str] = headers
5858
self.request_payload: TInitialPayload = initial_payload
5959
self.env: Dict[str, Optional[str]] = env or {}
60-
self.retries: int = retries or DEFAULT_RETRIES
60+
self.retries: int = DEFAULT_RETRIES if retries is None else retries
6161
self._executor: _AutoExecutor = _AutoExecutor(self, self._steps)
6262

6363
def run(

upstash_workflow/serve/options.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def _initial_payload_parser(initial_request: str) -> TInitialPayload:
106106
),
107107
base_url=base_url or environment.get("UPSTASH_WORKFLOW_URL"),
108108
env=environment,
109-
retries=retries or DEFAULT_RETRIES,
109+
retries=DEFAULT_RETRIES if retries is None else retries,
110110
url=url,
111111
)
112112

upstash_workflow/workflow_requests.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ def _get_headers(
299299
)
300300

301301
content_type = user_headers.get("Content-Type") if user_headers else None
302-
content_type = content_type or DEFAULT_CONTENT_TYPE
302+
content_type = DEFAULT_CONTENT_TYPE if content_type is None else content_type
303303

304304
if step and step.call_headers is not None:
305305
forwarded_headers = {

0 commit comments

Comments
 (0)