Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a problem that duplicated socket path for job queue on restart
Here is a problem case:
* Start f-p-d:
* Create a new JobQueue.
* The JobQueue creates #{DB_PATH}.sock.
* Create workers.
* Workers connect to #{DB_PATH}.sock.
* `touch catalog.json`.
* Start new dispatcher.
* Create a new JobQueue.
* The JobQueue removes existing #{DB_PATH}.sock and
creates #{DB_PATH}.sock.
* Create workers... (async. continue...)
* Stop old dispatcher.
* Stop its JobQueue.
* The JobQueue removes #{DB_PATH}.sock.
* Created workers. (cont.)
* Workers connect to #{DB_PATH}.sock but #{DB_PATH}.sock doesn't exist!- Loading branch information