Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect to redis database once, not on each request #8

Open
chrisjsimpson opened this issue Mar 7, 2022 · 0 comments
Open

Connect to redis database once, not on each request #8

chrisjsimpson opened this issue Mar 7, 2022 · 0 comments

Comments

@chrisjsimpson
Copy link
Contributor

Previoulsy the stripe connect account announcer would

  1. Connect to redis
    const redisConn = await Deno.connect({hostname: REDIS_HOSTNAME, port: Number(REDIS_PORT)})
  2. Re-use the redis database connectino for each request:
    redisConn.write(encoder.encode(`AUTH ${REDIS_PASSWORD}\n\n`));

However the python version creates a new connection to redis for every request (not needed), because redis_set_value creates a new connection each time.

Solution you'd like:

Use the same pattern for the python version: Connect to reddis, re-use the connection for each request.

@chrisjsimpson chrisjsimpson changed the title Connectino to redis database once, not on each request Connect to redis database once, not on each request Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant