You think that i am running it through supervisor? But i run it manually and think that i am running it right way (maybe i am wrong). I am starting bench manually, after every vagrant up or reload.
I am doing it with this command:
Yes, maybe start over is good way. For now, i am running every python change through whitelisted function (in console: bench execute) and it is working without any restart, or clear cache command.
ok thanks, will try this too, i had some problems with installing it on my mac few months ago when i started. So i choosed vagrant box. But now i am little bit more familiar with erpnext, so maybe i will be able run it also without vagrant.
bench migrate should update all the python changes made wouldn’t it?
So have your vagrant site up and running.
Make code changes in atom
switch to terminal
bench migrate
bench migrate will read JSON files and make changes to the database accordingly
Maybe used in conjunction with bench reload-doc
bench --site mysite.name reload-doc MYMODULE MYDOCTYPE MYDOCNAME
Or use one of the update variants listed below
bench update
Pulls changes for bench-repo and all apps, applies patches, builds JS and CSS, and then migrates.
bench update --pull
Pull changes in all the apps in bench
bench update --patch
Run migrations for all sites in the bench
bench update --build
Build JS and CSS artifacts for the bench
bench update --bench
Update bench
bench update --requirements
Update requirements
bench update --restart-supervisor
Restart supervisor processes after update
Did you guys mean in normal development server if I make a change in python file it will immediately reloaded on server without having to run bench stop and bench start ?
i tried bench migrate command, and yes, python changes was loaded after bench migrate. But this is not solution for me. Bench migrate took few minutes. Its too long in developing.
Did you guys mean in normal development environment if I make a change in python file it will immediately reloaded on server without having to run stopping bench and run bench start again ?
@janecek.mato I know! I don’t know what else it could be. This is exactly that behavior which is why I’m so confused. To be clear it should be in site_config.json, not common_site_config.json
@pipech Yes, when you make changes to python, it works that way, at least on localhost. You can set up remote editing packages with your text editor to make changes to an offsite/cloud server. I know these is available for Atom and VSCode at the very least, it’s usually a combination of mate/rmate and ftp.
These are basically the same. The DB type shouldn’t be a variable that effects this. You have run bench disable-production, right? I think I suggested that already.
when i run this command, i get error, but it is maybe because of in vagrant is not production setted, like nginx and etc…
frappe@ubuntu:~/frappe-bench$ sudo bench disable-production
Traceback (most recent call last):
File "/usr/local/bin/bench", line 11, in <module>
load_entry_point('bench', 'console_scripts', 'bench')()
File "/home/frappe/.bench/bench/cli.py", line 40, in cli
bench_command()
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/frappe/.bench/bench/commands/utils.py", line 152, in disable_production
disable_production(bench_path='.')
File "/home/frappe/.bench/bench/config/production_setup.py", line 64, in disable_production
reload_nginx()
File "/home/frappe/.bench/bench/config/production_setup.py", line 142, in reload_nginx
subprocess.check_output(['sudo', find_executable('nginx'), '-t'])
File "/usr/lib/python2.7/subprocess.py", line 567, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
raise child_exception
TypeError: execv() arg 2 must contain only strings