Skip to content

Commit

Permalink
Remove fallback to json at all
Browse files Browse the repository at this point in the history
  • Loading branch information
psrok1 committed May 15, 2024
1 parent 794a0a0 commit 091080c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions karton/core/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,11 +455,7 @@ def unserialize_resources(value: Any) -> Any:
if parse_resources:
task_data = json.loads(data, object_hook=unserialize_resources)
else:
try:
task_data = orjson.loads(data)
except orjson.JSONDecodeError:
# fallback, in case orjson raises exception during loading
task_data = json.loads(data)
task_data = orjson.loads(data)

# Compatibility with Karton <5.2.0
headers_persistent_fallback = task_data["payload_persistent"].get(
Expand Down

0 comments on commit 091080c

Please sign in to comment.