Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

Need to restart cozy-light when installing an application #2

Open
jbd opened this issue Oct 25, 2014 · 9 comments
Open

Need to restart cozy-light when installing an application #2

jbd opened this issue Oct 25, 2014 · 9 comments

Comments

@jbd
Copy link

jbd commented Oct 25, 2014

Hi,

when I'm installing an app (like cozy-calendar), it does not appear on the cozy-light start page, even after a refresh. I've to restart cozy-light for the changes to take effect. It breaks (a little) the good feeling you can have when starting playing with cozy-light =)

$ node -v
v0.10.29

$ ./cozy-light -V
0.2.17

$ ./cozy-light display-config
{
  "apps": {
    "cozy-labs/calendar": {
      "name": "cozy-calendar",
      "displayName": "Calendar",
      "version": "1.0.13",
      "description": "Calendars manager application with embedded database.",
      "type": "classic"
    }
  }
}
@jbd jbd changed the title Need to restart cozy-light when installating an application Need to restart cozy-light when installing an application Oct 25, 2014
@frankrousseau
Copy link
Contributor

Thank you @jbd for the report. We are aware of that. I'm going to look if I can perform a quick fix on it.

@frankrousseau
Copy link
Contributor

After investigating it, I can't see straightforward solution. Doing that requires that the cozy-light processing the installation communicates with the running cozy-light server. It requires to add an addtional route to the API server. So that's a little bit more work :).

@maboiteaspam
Copy link
Contributor

How about having a bin wrapper that would install a fs.watcher on cozy config file, and stop / start process of the server ?

@frankrousseau
Copy link
Contributor

Yeah a watcher would be a simpler solution than two instances communicating each other.

@frankrousseau
Copy link
Contributor

@jbd Hot app reloading will be included in the next 0.3.0 release. Currently it reloads all apps when the configuration file is changed. It could be classier but that way of dealing with hot relaoding keep the code simple.

@maboiteaspam
Copy link
Contributor

as soon we have more complete test suite, eventually, integration test, this ticket can be considered a close.
For now, on, the function works but may remains unstable as not fully under test.

@maboiteaspam
Copy link
Contributor

On next release we ll close that topic if you are fine with it.

@frankrousseau
Copy link
Contributor

We don't want the same port. If you start two applications in a row, with the same port, the second will raise an 'address is in used' error.

@maboiteaspam
Copy link
Contributor

Unless it is properly closed. Which must be the case, thus there is no reason to consume higher ports than the number of app+1. As i said, if this strategy is kept, IE keep using new port number, users will face troubles when lots of restart occurs.

frankrousseau pushed a commit that referenced this issue Mar 13, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants