Better development process

51 views
Skip to first unread message

Roei Erez

unread,
Jul 20, 2017, 5:33:32 AM7/20/17
to tryton
Hello,

I am new to tryton but fell in love...
My problem right now is that the development experience is slow because every time I change the code I need to manually restart the server and reconnect from the client.
Would appreciate any tip on how to make it more productive.

P.S I have read about auto_reload=true in the documentation but it didn't work (maybe because I didn't write it in the right place.

Roei

Sergi Almacellas Abellana

unread,
Jul 20, 2017, 5:40:02 AM7/20/17
to try...@googlegroups.com
El 20/07/17 a les 11:21, Roei Erez ha escrit:
> Hello,
Hi Roei,
>
> I am new to tryton but fell in love...

Welcome aboard!

> My problem right now is that the development experience is slow because
> every time I change the code I need to manually restart the server and
> reconnect from the client. > Would appreciate any tip on how to make it more productive.

This is what I use:

launch trytond server with --dev flag, which makes the server reload the
code everytime is changed. Note that database upgrades must be applied
with trytond-admin but there is no need to stop the server to do this.

launch tryton with -d flag, which disables the cache and allows you to
see the gui related changes with only closing and reopening the tab.

And as a bonus tip, if you develop with tests (I recommend it), you can
use the DB_CACHE environment variable to specify a folder where a backup
of the database will be saved when first run the test scenario. New runs
will use the backup, with speed-ups the test running a lot. Just two
comments here:

1. You need sqlitebck installed on your dev environment to be able to do
backups on sqlite
2. If you change something of the database structure or static data, the
database dump must be manually removed.

Hope it helps.


--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

Roei Erez

unread,
Jul 20, 2017, 6:10:06 AM7/20/17
to tryton
Top man!! 
Thank you very much, very appreciated.
Reply all
Reply to author
Forward
0 new messages