blockform icon indicating copy to clipboard operation
blockform copied to clipboard

auto rebuild/restart server

Open sihoang opened this issue 6 years ago • 5 comments

This is optional for those don't want manually restart server while writing code. I haven't used it myself and would like to hear your opnions.

I had a small script using fswatch https://github.com/WeTrustPlatform/charity-management-serv/blob/master/live_reload.sh It works well on Mac but doesn't on my void-linux machine

sihoang avatar Dec 21 '18 23:12 sihoang

I think it's nice to have. Does it work well? Can you also watch the html files in templates/ before I merge this? Will it kill my goroutines? I'm asking this because I often edit/save my go files while the app is busy creating or destroying nodes. If it kills the goroutines, it will let the cloud host and db in an inconsistent state.

kivutar avatar Dec 22 '18 08:12 kivutar

I think the goroutines must be handled anyway in another PR. Otherwise, we won't be able to deploy newer version while app is busy.

sihoang avatar Jan 02 '19 20:01 sihoang

I'll add the html's template later, don't merge yet

sihoang avatar Jan 02 '19 21:01 sihoang

You're right. We have a branch for graceful shutdown now. But as the routines sometimes take 3 minutes to complete (during a VM creation) even graceful shutdown is not enough. I'm thinking about breaking VM creation in more robust and shorter steps.

kivutar avatar Jan 03 '19 09:01 kivutar

agreed. The VM provision is tough. It's a tricky problem because we might end up with something like terraform which ensures the VM will be in the state you specify it to be. Let me know if you have any ideas to simplify it.

sihoang avatar Jan 03 '19 23:01 sihoang