Issue 9365

Title
Support TRYTOND_DATABASE_URI as database basis for scripts
Priority
feature
Status
resolved
Nosy list
ced, pokoli, reviewbot, roundup-bot
Assigned to
ced
Keywords
review

Created on 2020-05-25.00:15:49 by ced, last changed 7 months ago by roundup-bot.

Messages

New changeset 2687130161d2 by Cédric Krier in branch 'default':
Support database without schema with TRYTOND_DATABASE_URI
https://hg.tryton.org/tryton-env/rev/2687130161d2
New changeset e7540163fd94 by Cédric Krier in branch 'default':
Support database without schema with TRYTOND_DATABASE_URI
https://hg.tryton.org/proteus/rev/e7540163fd94
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2020-05-27.14:21:11
Indeed it should be doable.
Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2020-05-27.14:01:54
I'm wondering if it won't be better to add this in proteus so we do not need to modify all the proteus scripts.
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2020-05-25.00:19:43
Here is review297831002.
I think  it will be good to backport it to be included in docker images so it will avoid support requests from Docker users.
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2020-05-25.00:15:48
When using the Docker images to run those scripts, the environment variable TRYTOND_DATABASE_URI can not be used because the database option is required.
Indeed if the user set only a database name, we should use the URI to construct the proper parameter. So it will allow to run script like:

docker run --rm -ti tryton/tryton trytond_import_currencies -d <database>

This unify the usage with other command line like trytond-cron etc.
History
Date User Action Args
2020-06-06 14:07:24roundup-botsetmessages: + msg58556
2020-06-06 14:07:22roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg58555
2020-05-27 14:46:08reviewbotsetmessages: + msg58327
2020-05-27 14:21:11cedsetmessages: + msg58322
2020-05-27 14:01:54pokolisetnosy: + pokoli
messages: + msg58320
2020-05-25 00:36:45reviewbotsetnosy: + reviewbot
messages: + msg58248
2020-05-25 00:19:43cedsetstatus: in-progress -> testing
reviews: 297831002
messages: + msg58247
keyword: + review
2020-05-25 00:15:49cedcreate