bus_alt_connection: support the cron worker also

Open
#3,863 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
52/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
postgresql, python
Domain
backend, databases

Research direction

Start by reading the bus_alt_connection module's existing handling of the gevent worker's LISTEN imbus connection. Trace how cron workers issue LISTEN cron_trigger and how that connection is configured when using pgbouncer. Done means cron workers can use the appropriate connection without breaking the existing gevent-worker behavior.

Written by the indexing model from the issue text.

Description

bug

The bus_alt_connection module allows the gevent pod to run with a specific connection to run the LISTEN imbus SQL request. However since odoo 15 the cron workers also LISTEN cron_trigger and this is not handled by the module, which makes some parts of Odoo broken when running through pgbouncer.

side note: the queue_job addon also uses LISTEN, I plan to add a setting in that addon to share the configuration with bus_alt_connection, and not add a glue module.

Dominant language
Python
Stars
960
Forks
1.7k
Avg merge
5d 23h
Merged PRs (30d)
15

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OCA/server-tools

All issues in OCA/server-tools

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.