hpcc-systems/HPCC-Platform — pull request #3260 by rengolin (2012-08-29 14:26:38+00:00)
Title: gh-2122 Add pause/resume to dfuserver

Not ready for pulling yet, but I need some code review and help to test this code. I'll re-target to 3.10.x once my doubts are solved.

I'm not sure the code is correct, though it looks so and follows what all other similar implementations are doing.

My tests have been ineffective, either because the code is wrong or because my tests are.

Tests:
* start dfuserver (via service hpdd-init start)
* submit jobs via dfuplus (loop [ dfuplus add sub; sleep 1; ]
* stop/pause/resume queue via "dfuserver STOP=1" like in init_dfuserver example

The queue does stop/pause/resume as seen by log on different runs (queue is already paused, etc). But jobs continue coming and being executed and files do change in the file-system.

One side effect of my new "isActive()" is that the queue can be both active and paused at the same time, which is weird, even though I (in theory), haven't changed the logic of queue liveness.