Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZAutomation/api/v1/modules/reinitialize/ changed instance number #500

Open
pmbert opened this issue Oct 12, 2019 · 3 comments
Open

ZAutomation/api/v1/modules/reinitialize/ changed instance number #500

pmbert opened this issue Oct 12, 2019 · 3 comments

Comments

@pmbert
Copy link

pmbert commented Oct 12, 2019

After using ZAutomation/api/v1/modules/reinitialize/{module} the running module instance was stopped, and restarted again with a new instance number. (This number was previously used by another instance of another module.)
Strangely that it had a new instance number but an old creationTime.

It should use also the old instance id.

Was very bad, because it destroyed my configuration.

@PoltoS
Copy link
Member

PoltoS commented Dec 9, 2019

Please check with v3.0.2 - we have fixed few things in it

@pmbert
Copy link
Author

pmbert commented Jan 12, 2021

I tested with V3.1.0, but behavior isn't changed.

reinitialize stops all running instances, reloads js and starts the instances again with reset virtual devices and maybe new instance number.

Maybe this behavior is intended, but for developing actually I need a function which does a module restart in the same way as zway restart does:

  • take new js
  • take new module.json
  • take old data from virtual devices
  • take old instance number
  • take old room assignment

It's annoying always to restart the whole application only for exchanging the javascript.

I'm wondering if there are even people who need the function in the current version.

@PoltoS
Copy link
Member

PoltoS commented Jan 12, 2021

Unfortunatelly there are no guarantee that the old code is unloaded - it is JS, you can not unload the code. So full restart is better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants