Passa al contenuto
Odoo Menu
  • Accedi
  • Provalo gratis
  • App
    Finanze
    • Contabilità
    • Fatturazione
    • Note spese
    • Fogli di calcolo (BI)
    • Documenti
    • Firma
    Vendite
    • CRM
    • Vendite
    • Punto vendita Negozio
    • Punto vendita Ristorante
    • Abbonamenti
    • Noleggi
    Siti web
    • Configuratore sito web
    • E-commerce
    • Blog
    • Forum
    • Live chat
    • E-learning
    Supply chain
    • Magazzino
    • Produzione
    • PLM
    • Acquisti
    • Manutenzione
    • Qualità
    Risorse umane
    • Dipendenti
    • Assunzioni
    • Ferie
    • Valutazioni
    • Referral dipendenti
    • Parco veicoli
    Marketing
    • Social marketing
    • E-mail marketing
    • SMS marketing
    • Eventi
    • Marketing automation
    • Sondaggi
    Servizi
    • Progetti
    • Fogli ore
    • Assistenza sul campo
    • Helpdesk
    • Pianificazione
    • Appuntamenti
    Produttività
    • Comunicazioni
    • Approvazioni
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    App di terze parti Odoo Studio Piattaforma cloud Odoo
  • Settori
    Retail
    • Libreria
    • Negozio di abbigliamento
    • Negozio di arredamento
    • Alimentari
    • Ferramenta
    • Negozio di giocattoli
    Cibo e ospitalità
    • Bar e pub
    • Ristorante
    • Fast food
    • Pensione
    • Grossista di bevande
    • Hotel
    Agenzia immobiliare
    • Agenzia immobiliare
    • Studio di architettura
    • Edilizia
    • Gestione immobiliare
    • Impresa di giardinaggio
    • Associazione di proprietari immobiliari
    Consulenza
    • Società di contabilità
    • Partner Odoo
    • Agenzia di marketing
    • Studio legale
    • Selezione del personale
    • Audit e certificazione
    Produzione
    • Tessile
    • Metallo
    • Arredamenti
    • Alimentare
    • Birrificio
    • Ditta di regalistica aziendale
    Benessere e sport
    • Club sportivo
    • Negozio di ottica
    • Centro fitness
    • Centro benessere
    • Farmacia
    • Parrucchiere
    Commercio
    • Tuttofare
    • Hardware e assistenza IT
    • Ditta di installazione di pannelli solari
    • Calzolaio
    • Servizi di pulizia
    • Servizi di climatizzazione
    Altro
    • Organizzazione non profit
    • Ente per la tutela ambientale
    • Agenzia di cartellonistica pubblicitaria
    • Studio fotografico
    • Punto noleggio di biciclette
    • Rivenditore di software
    Carica tutti i settori
  • Community
    Apprendimento
    • Tutorial
    • Documentazione
    • Certificazioni 
    • Formazione
    • Blog
    • Podcast
    Potenzia la tua formazione
    • Programma educativo
    • Scale Up! Business Game
    • Visita Odoo
    Ottieni il software
    • Scarica
    • Versioni a confronto
    • Note di versione
    Collabora
    • Github
    • Forum
    • Eventi
    • Traduzioni
    • Diventa nostro partner
    • Servizi per partner
    • Registra la tua società di contabilità
    Ottieni servizi
    • Trova un partner
    • Trova un contabile
    • Incontra un esperto
    • Servizi di implementazione
    • Testimonianze dei clienti
    • Supporto
    • Aggiornamenti
    GitHub Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Richiedi una demo
  • Prezzi
  • Aiuto

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Contabilità
  • Magazzino
  • PoS
  • Progetti
  • MRP
All apps
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
Assistenza

How to launch Connector with multi worker?

Iscriviti

Ricevi una notifica quando c'è un'attività per questo post

La domanda è stata contrassegnata
v7multiprocessconnector
7 Risposte
12431 Visualizzazioni
Avatar
Atchuthan - Technical Consultant, Sodexis Inc

I used guide available for Multiprocessing in openerp-connector. 

I created a bash file as start_connector and it contains

#!/bin/bash
PYTHONPATH=/opt/openerp/v7.0/server connector/openerp-connector-worker --config /etc/openerp-server.conf --workers=2 --logfile=/tmp/openerp-connector.log

and I tried to start this file using this command

$ ./start_connector

Error Traceback:

  File "/usr/lib/python2.7/threading.py", line 808, in __bootstrap_inner
    self.run()
  File "/opt/openerp/v7.0/custom_modules/launchpad_links/connector/queue/worker.py", line 304, in run
    self.check_alive(db_name, worker)
  File "/opt/openerp/v7.0/custom_modules/launchpad_links/connector/queue/worker.py", line 317, in check_alive
    self._notify_alive(session, worker)
  File "/opt/openerp/v7.0/custom_modules/launchpad_links/connector/queue/worker.py", line 325, in _notify_alive
    dbworker_obj = session.pool.get('queue.worker')
  File "/opt/openerp/v7.0/custom_modules/launchpad_links/connector/session.py", line 128, in pool
    self._pool = openerp.pooler.get_pool(self.cr.dbname)
  File "/opt/openerp/v7.0/server/openerp/pooler.py", line 49, in get_pool
    return get_db_and_pool(db_name, force_demo, status, update_module)[1]
  File "/opt/openerp/v7.0/server/openerp/pooler.py", line 33, in get_db_and_pool
    registry = RegistryManager.get(db_name, force_demo, status, update_module)
  File "/opt/openerp/v7.0/server/openerp/modules/registry.py", line 193, in get
    update_module)
  File "/opt/openerp/v7.0/server/openerp/modules/registry.py", line 219, in new
    openerp.modules.load_modules(registry.db, force_demo, status, update_module)
  File "/opt/openerp/v7.0/server/openerp/modules/loading.py", line 350, in load_modules
    force, status, report, loaded_modules, update_module)
  File "/opt/openerp/v7.0/server/openerp/modules/loading.py", line 256, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/opt/openerp/v7.0/server/openerp/modules/loading.py", line 159, in load_module_graph
    load_openerp_module(package.name)
  File "/opt/openerp/v7.0/server/openerp/modules/module.py", line 415, in load_openerp_module
    getattr(sys.modules['openerp.addons.' + module_name], info['post_load'])()
  File "/opt/openerp/v7.0/web/addons/web/http.py", line 628, in wsgi_postload
    openerp.wsgi.register_wsgi_handler(Root())
  File "/opt/openerp/v7.0/web/addons/web/http.py", line 517, in __init__
    self.load_addons()
  File "/opt/openerp/v7.0/web/addons/web/http.py", line 580, in load_addons
    m = __import__('openerp.addons.' + module)
  File "/opt/openerp/v7.0/server/openerp/modules/module.py", line 133, in load_module
    mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
  File "/opt/openerp/v7.0/custom_modules/launchpad_links/prestashoperpconnect/__init__.py", line 27, in <module>
    import prestashop_model
  File "/opt/openerp/v7.0/custom_modules/launchpad_links/prestashoperpconnect/prestashop_model.py", line 36, in <module>
    from .unit.import_synchronizer import (
  File "/opt/openerp/v7.0/custom_modules/launchpad_links/prestashoperpconnect/unit/__init__.py", line 26, in <module>
    import mapper
  File "/opt/openerp/v7.0/custom_modules/launchpad_links/prestashoperpconnect/unit/mapper.py", line 35, in <module>
    from backend_adapter import GenericAdapter
  File "/opt/openerp/v7.0/custom_modules/launchpad_links/prestashoperpconnect/unit/backend_adapter.py", line 29, in <module>
    from prestapyt import PrestaShopWebServiceDict
  File "/usr/local/lib/python2.7/dist-packages/prestapyt-0.4.0-py2.7.egg/prestapyt/__init__.py", line 1, in <module>
    from prestapyt import PrestaShopWebService
  File "/usr/local/lib/python2.7/dist-packages/prestapyt-0.4.0-py2.7.egg/prestapyt/prestapyt.py", line 21, in <module>
    import requests
  File "/usr/local/lib/python2.7/dist-packages/requests/__init__.py", line 52, in <module>
    from . import utils
  File "/usr/local/lib/python2.7/dist-packages/requests/utils.py", line 22, in <module>
    from .compat import parse_http_list as _parse_list_header
  File "/usr/local/lib/python2.7/dist-packages/requests/compat.py", line 95, in <module>
    from .packages import chardet
  File "/usr/local/lib/python2.7/dist-packages/requests/packages/__init__.py", line 3, in <module>
    from . import urllib3
  File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/__init__.py", line 16, in <module>
    from .connectionpool import (
  File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py", line 20, in <module>
    from queue import LifoQueue, Empty, Full
  File "/opt/openerp/v7.0/custom_modules/launchpad/openerp-connector/connector/queue/__init__.py", line 22, in <module>
    import model
  File "/opt/openerp/v7.0/custom_modules/launchpad/openerp-connector/connector/queue/model.py", line 30, in <module>
    from .job import STATES, DONE, PENDING, OpenERPJobStorage
  File "/opt/openerp/v7.0/custom_modules/launchpad/openerp-connector/connector/queue/job.py", line 33, in <module>
    from ..exception import (NotReadableJobError,
ValueError: Attempted relative import beyond toplevel package

Where am I wrong?

or Is there a better method of launching in multi-worker mode for connector?

0
Avatar
Abbandona
Guewen Baconnier

Did you manually edited the connector files? Because the line "from connection.exception import (NotReadableJobError," is normally "..exception import (NotReadableJobError,"

Atchuthan - Technical Consultant, Sodexis Inc
Autore

@Guewen Baconnier: yes, I made changes to solve the error. I have updated the original error.

Avatar
Med Said BARA
Risposta migliore

PYTHON RELATIVE IMPORT ERROR (Google PEP328).

This mean that the file exception.py can't be found.

NB: Try first to check if your addons custom-modules (/opt/openerp/v7.0/custom_modules/launchpad/openerp-connector) is in the addon_path  of your openerp-server.conf, add it if not.

This error is due to your installation path !

You can edit your .....opt/openerp/v7.0/custom_modules/launchpad/openerp-connector/connector/queue/job.py file at line 34:

and give the right path to the file exception.py: from the-full-path-to-the-connector-module.connector.exception import ............

Like in:  from openerp.addons.connector.exception import .........

This also can be corrected in /queue/__init__.py  by importing the /connector/exception.py package

The BEST WAY to avoid this kind of errors is to use an ABSOLUTE IMPORT

 

3
Avatar
Abbandona
Avatar
Guewen Baconnier
Risposta migliore

Use this buildout configuration that provide a helper script to run the multiprocess workers.

1
Avatar
Abbandona
Avatar
Miku Laitinen
Risposta migliore

It seems that urllib3/connectionpool.py (line 20) imports stuff from "queue", which most certainly shouldn't be the "queue" package in the connector odoo module.

Changing the "queue" package name under connector seems to work, but it's still a bit hacky. This could also be an import priority issue. 

0
Avatar
Abbandona
Avatar
Atchuthan - Technical Consultant, Sodexis Inc
Autore Risposta migliore

When I looked into the community mailing list, there were 2 messages that had similar topic of Multi worker Support 

1. https://lists.launchpad.net/openerp-connector-community/msg00320.html

2. https://lists.launchpad.net/openerp-connector-community/msg00005.html

 

But there seems to be no other useful leads to solve this problem.  

Need assistance.

 

0
Avatar
Abbandona
Avatar
Vinay
Risposta migliore

You can try Magento openerp connector provide by webkul : https://store.webkul.com/Magento-Extensions/Magento-OpenERP-Bridge.html

Their code don't base on worker concept but using core observer pattern of mangeto 

-5
Avatar
Abbandona
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!

Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!

Registrati
Post correlati Risposte Visualizzazioni Attività
What's the right way to start cron worker jobs? Risolto
gunicorn cron v7 multiprocess
Avatar
Avatar
Avatar
Avatar
Avatar
8
feb 17
40844
What is batter Gunicorn over WSGI Benchmarking or WSGI
gunicorn v7 multiprocess benchmark
Avatar
0
mar 15
7841
How to run V7.0 in multi-threaded mode?
gunicorn v7 nginx multiprocess
Avatar
Avatar
Avatar
3
mar 15
18047
How to add a "Delete" button on the popup form? Risolto
v7
Avatar
Avatar
1
ott 25
5463
how to deploy multiple odoo services with multiprocessing
multiprocess
Avatar
0
gen 25
1710
Community
  • Tutorial
  • Documentazione
  • Forum
Open source
  • Scarica
  • Github
  • Runbot
  • Traduzioni
Servizi
  • Hosting Odoo.sh
  • Supporto
  • Aggiornamenti
  • Sviluppi personalizzati
  • Formazione
  • Trova un contabile
  • Trova un partner
  • Diventa nostro partner
Chi siamo
  • La nostra azienda
  • Branding
  • Contattaci
  • Lavora con noi
  • Eventi
  • Podcast
  • Blog
  • Clienti
  • Note legali • Privacy
  • Sicurezza
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo è un gestionale di applicazioni aziendali open source pensato per coprire tutte le esigenze della tua azienda: CRM, Vendite, E-commerce, Magazzino, Produzione, Fatturazione elettronica, Project Management e molto altro.

Il punto di forza di Odoo è quello di offrire un ecosistema unico di app facili da usare, intuitive e completamente integrate tra loro.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now