Skip to content

[Feature] Concurrent job runners #2

Closed

Description

@guewen

In a use case with several hosts running Odoo, we might want either to:

  • allow several jobrunners to run concurrently on several hosts, which might be hard due to the queues kept in local memory
  • elect a master jobrunner allowing to work, the other ones wait and one of them takes over if the master is down

Activity

  1. lasley commented on Nov 4, 2016

    @lasley
    Contributor

    IMO the best way to implement this would be a Message Broker, such as RabbitMQ.

    We would just need to advertise to and ingest from a simple Work queue. In the event of the master down, an Alternate Exchange would do nicely I think.

  2. added a commit that references this issue on Dec 7, 2016
  3. yucer commented on Mar 16, 2017

    @yucer

    Odoo optionally uses gevent for the bus. So the dependency is already there.

    Maybe gevent.queue can be used with that purpose.

  4. thomaspaulb commented on Sep 7, 2021

    @thomaspaulb

    Elect a master jobrunner allowing to work, the other ones wait and one of them takes over if the master is down

    Could this be done via a database lock? Eg. each Odoo instance regularly tries to grab a database lock by which to become the master job runner; if it succeeds, it becomes, if not, does nothing and tries again after a while.

  5. thomaspaulb commented on Sep 7, 2021

    @thomaspaulb
  6. nilshamerlinck commented on Sep 7, 2021

    @nilshamerlinck
    Contributor

    Hi @thomaspaulb you might want to have a look at #256 :)

  7. thomaspaulb commented on Sep 7, 2021

    @thomaspaulb

    @nilshamerlinck I actually just found that one too haha, thanks.

  8. github-actions commented on Mar 6, 2022

    @github-actions

    There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
    If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

  9. added
    stalePR/Issue without recent activity, it'll be soon closed automatically.
    on Mar 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementstalePR/Issue without recent activity, it'll be soon closed automatically.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions