Skip to content

Commit cdb0dc9

Browse files
authored
Fixed async redis code snippet (#11267)
1 parent edf548a commit cdb0dc9

File tree

1 file changed

+3
-3
lines changed
  • docs/platforms/python/integrations/redis

1 file changed

+3
-3
lines changed

docs/platforms/python/integrations/redis/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ import redis.asyncio as redis
5959

6060
async def main():
6161
sentry_sdk.init(...) # same as above
62-
rc = RedisCluster(host='localhost', port=16379)
62+
r = redis.Redis(host='localhost', port=6379)
6363

6464
with sentry_sdk.start_transaction(name="testing_sentry"):
65-
rc.set("foo", "bar")
66-
rc.get("foo")
65+
await r.set("foo", "bar")
66+
await r.get("foo")
6767

6868
asyncio.run(main())
6969
```

0 commit comments

Comments
 (0)