openerp-connector-community team mailing list archive
-
openerp-connector-community team
-
Mailing list archive
-
Message #00595
Re: How can a job indicate it failed, and should be rescheduled?
Hello,
Generally when something went bad you should raise a standard Error or a
ConnectorError.
If you need your job to have multiple retries you have to raise a
RetryableJobError or one of his subclass like NetworkRetryableError.
http://odoo-connector.com/api/api_exception.html?highlight=retryable#connector.exception.RetryableJobError
By default, the retry number is of five attemps.
Regards
Nicolas
2015-01-13 14:33 GMT+01:00 Ron <ron.arts@xxxxxxxxx>:
> Hi,
>
> I do not see documented if a job can give a return value for failed.
> Also, from what I understand in worker.py, any return values are ignored.
>
> Is the recommended way to raise an exception, like
>
> raise ValueError('A very specific bad thing happened')
>
> Thanks,
> Ron
>
> --
> Mailing list: https://launchpad.net/~openerp-connector-community
> Post to : openerp-connector-community@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openerp-connector-community
> More help : https://help.launchpad.net/ListHelp
>
>
--
Nicolas Bessi
Senior ERP consultant
Business Solution technical manager
Camptocamp SA
PSE A
CH-1015 Lausanne
http://openerp.camptocamp.com
Direct: +41 21 619 10 26
Office: +41 21 619 10 10
References