Skip to content

[FIX] Allow to run jobs when Odoo is not listening on localhost#51

Merged
guewen merged 1 commit into
OCA:11.0from
subteno-it:11.0-allow-other-than-localhost
Apr 5, 2018
Merged

[FIX] Allow to run jobs when Odoo is not listening on localhost#51
guewen merged 1 commit into
OCA:11.0from
subteno-it:11.0-allow-other-than-localhost

Conversation

@Garamotte
Copy link
Copy Markdown

On our dev boxes, we have Odoo running on loopback addresses other than localhost (ie. 127.16.4.2 for example), and queue_job had localhost hardcoded.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.07%) to 78.235% when pulling c0cd77e on syleam:11.0-allow-other-than-localhost into ba5522f on OCA:11.0.

@coveralls
Copy link
Copy Markdown

coveralls commented Feb 6, 2018

Coverage Status

Coverage decreased (-0.5%) to 77.675% when pulling 0f9833d on syleam:11.0-allow-other-than-localhost into 221dd95 on OCA:11.0.

@Garamotte Garamotte force-pushed the 11.0-allow-other-than-localhost branch from c0cd77e to 41fd7f8 Compare February 6, 2018 15:57
Copy link
Copy Markdown
Contributor

@lmignon lmignon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sylvain-garancher Thank you for the fix.
LGTM (Code review only)

Copy link
Copy Markdown
Contributor

@simahawk simahawk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code LGTM

@sbidoul
Copy link
Copy Markdown
Member

sbidoul commented Feb 7, 2018

@sylvain-garancher do you plan to update the documentation too?
Note there was extensive work on this topic in 9.0: https://github.com/OCA/connector/pull/247/files

@guewen
Copy link
Copy Markdown
Member

guewen commented Feb 8, 2018

Yep I think the PR @sbidoul linked should be ported, a simple cherry-pick won't be enough though.

@Garamotte
Copy link
Copy Markdown
Author

Thanks, I didn't see the PR in 9.0 (because it was in another repo).
I'll update my PR when I have some time.

@Garamotte Garamotte force-pushed the 11.0-allow-other-than-localhost branch 2 times, most recently from c8f2f3a to b462fbf Compare February 8, 2018 23:22
@Garamotte
Copy link
Copy Markdown
Author

Garamotte commented Feb 8, 2018

Git was smart enough to make most of the work with a cherry-pick, I mostly had to update the configuration part, but I didn't took time to test if everything works.

I credited the original author of this work on v9 in the commit message ;)
Thanks @sbidoul for the pointer.

Copy link
Copy Markdown
Member

@guewen guewen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great thanks! One remaining instance of 'connector' slipped through

Comment thread queue_job/jobrunner/runner.py Outdated
def urlopen():
url = ('http://localhost:%s/queue_job/runjob?db=%s&job_uuid=%s' %
(port, db_name, job_uuid))
url = ('%s://%s:%s/connector/runjob?db=%s&job_uuid=%s' %
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/connector/queue_job/

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. Fixed :)

Initial work by Nils Hamerlinck <nils@hamerlinck.fr> on the connector
module for Odoo v9.0 (commit 383959afc6f1f71a45320d9cab45b84a05572ac7)
@Garamotte Garamotte force-pushed the 11.0-allow-other-than-localhost branch from b462fbf to 0f9833d Compare February 9, 2018 06:36
@Garamotte
Copy link
Copy Markdown
Author

@sbidoul I think this PR can be merged now.

@guewen guewen merged commit 7810948 into OCA:11.0 Apr 5, 2018
@aliencrash
Copy link
Copy Markdown

How we have to configure to use this feature?

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

Successfully merging this pull request may close these issues.

7 participants