I am able to rename directories and engine is started using new name, but when I do GET /domains I still see the old one. Is there some reference on DB ?
There is only one engine on a given port. If you ask for "/domains" on this port, you're getting it's content. Suppose you have an engine named EngineA containing domains Europarl and MultiUN. Renaming this engine to EngineB won't change the fact that it's domains are still Europarl and MultiUN.
Hi @rptl
just like @EtienneAb3d said, renaming an engine does just that: renames the engine. It doesn't rename any of the domains, nor it changes the ports the engine runs on.
Not quite sure what you want to do, so here's some tips:
mmt start, mmt stop, mmt status and so on, you can (1) stop the engine and (2) rename the folder inside MMT/engines.If I could not understand what is your actual need, or if you have any doubts about the translation process and/or the architecture, please don't hesitate to ask it here.
Thanks!
Hey @davidecaroselli, thanks.
My question was about how to rename a single domain. To be honest, I don't think it will be used often, I just wanted to adjust a typo on my current domain name.
@rptl got it!
I will work on this API in the next days; I'm going to push the code in the master branch asap.
Thanks for your patience.
Hi @rptl
the new API and command is available in the latest commit (https://github.com/ModernMT/MMT/commit/3dbccc4ef8e8b4647d37f6bc53907bb749c85a49) of master branch. You can update your distribution rebuilding it from source, here's the instructions: Installing from source code.
You can now use the mmt rename command like this:
./mmt rename "europarl" "NewName"
Or you can use directly the API Update Domain like this:
curl -X PUT http://localhost:8045/domains/1?name=NewName | python -mjson.tool
{
"data": {
"id": 1,
"name": "NewName"
},
"status": 200
}
Thanks for your support, we are closing the issue right now but if you have any other questions please don't hesitate to re-open it!
Thank you so much to spend your time to create it. Really appreciated.
On Aug 30, 2017 07:49, "Davide Caroselli" notifications@github.com wrote:
Closed #269 https://github.com/ModernMT/MMT/issues/269 via 3dbccc4
https://github.com/ModernMT/MMT/commit/3dbccc4ef8e8b4647d37f6bc53907bb749c85a49
.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ModernMT/MMT/issues/269#event-1227362911, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AEQOBddXi9v-qk30iLvOroLGdK-ztRZfks5sdT5IgaJpZM4PFMJK
.
Most helpful comment
Hi @rptl
the new API and command is available in the latest commit (https://github.com/ModernMT/MMT/commit/3dbccc4ef8e8b4647d37f6bc53907bb749c85a49) of master branch. You can update your distribution rebuilding it from source, here's the instructions: Installing from source code.
You can now use the
mmt renamecommand like this:Or you can use directly the API Update Domain like this:
Thanks for your support, we are closing the issue right now but if you have any other questions please don't hesitate to re-open it!