()
| 121 | //No input? We might be done.. |
| 122 | |
| 123 | var isComplete = function () { |
| 124 | //Check if any input was added dynamically |
| 125 | if (job.input.length > 0) { |
| 126 | job.is_complete = false; |
| 127 | return false; |
| 128 | } |
| 129 | |
| 130 | //Wait for workers or instances that are still working |
| 131 | return worker_count > 0 ? areWorkersComplete() : job.instances <= 0; |
| 132 | }; |
| 133 | |
| 134 | //If we're not complete, check periodically |
| 135 | if (isComplete()) { |
no test coverage detected