Warlock can have multiple instances on the same project #23

Closed
opened 2014-03-12 22:29:34 +00:00 by jamie · 4 comments
jamie commented 2014-03-12 22:29:34 +00:00 (Migrated from git.hazaar.io)

Warlock needs to run a few checks to see if it's already running. These checks are currently being done by the Warlock Controller from within the application, but because we can now use the Hazaar Tool to start Warlock, it needs to do it's own checks. If it is already running then it should quit immediately before opening any sockets and such.

Start up process should be as follows:

  1. Start
  2. Check to see if a signal.pid file exists. If not, don't do any process checking so skip to step 6.
  3. If it does, get the PID from inside the file and check to see if that process is still running.
  4. If the process is running, quit immediately.
  5. If the process is NOT running, assume it's a stale PID file so just continue.
  6. Get the current running PID and write it to signal.pid.
  7. Continue start up as normal.
Warlock needs to run a few checks to see if it's already running. These checks are currently being done by the Warlock Controller from within the application, but because we can now use the Hazaar Tool to start Warlock, it needs to do it's own checks. If it is already running then it should quit immediately before opening any sockets and such. Start up process should be as follows: 1. Start 2. Check to see if a `signal.pid` file exists. If not, don't do any process checking so skip to step 6. 3. If it does, get the PID from inside the file and check to see if that process is still running. 4. If the process is running, quit immediately. 5. If the process is NOT running, assume it's a stale PID file so just continue. 6. Get the current running PID and write it to `signal.pid`. 7. Continue start up as normal.
jamie commented 2014-03-18 21:51:35 +00:00 (Migrated from git.hazaar.io)

Warlock already has an isRunning() method that does the above but it I guess it's not working correctly.

Warlock already has an `isRunning()` method that does the above but it I guess it's not working correctly.
jamie commented 2014-03-18 21:53:10 +00:00 (Migrated from git.hazaar.io)

Ok. Looks like it's a permissions thing. The PID file is trying to be written to but it fails because the user running warlock does not have permission to overwrite the file. However startup continues as normal.

Ok. Looks like it's a permissions thing. The PID file is trying to be written to but it fails because the user running warlock does not have permission to overwrite the file. However startup continues as normal.
jamie commented 2014-03-19 03:03:41 +00:00 (Migrated from git.hazaar.io)

Fixed this as of 77595e420 which now handles signals and startup/shutdown better.

Fixed this as of 77595e420 which now handles signals and startup/shutdown better.
jamie commented 2014-03-19 03:03:43 +00:00 (Migrated from git.hazaar.io)

Status changed to closed

Status changed to closed
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: hazaar/hazaar-mvc-old#23
No description provided.