Liste les process actifs qui ne sont pas en cours d'execution

@return \Minibus\Model\Entity\Process[]:
6729
public function getRunningProcessList($mode, $annee) {
		$em = $this->getEntityManager ();
		$params = array (
				'mode' => $mode,
				'annee' => $annee,
				'running' => true 
		);
		$processes = $em->getRepository ( 'Minibus\Model\Entity\Process' )->findBy ( $params );
		return $processes;
	}
938232
public function getProcessedResult()
    {
        $status = StepResult::SKIPPED;

        if (!empty(static::$resultLabels[$this->getResultCode()])) {
            $status = static::$resultLabels[$this->getResultCode()];
        }

        return [
            'status' => $status,
            'error_message' => $this->getException(),
            'duration' => $this->getDuration() * 1000 * 1000000,
        ];
    }
405567
public function getProcesses($groups = array())
    {
        $processes = array();

        $result = $this->rpcClient->call('supervisor.getAllProcessInfo');
        foreach ($result as $cnt => $process) {
            // Skip process when process group not listed in $groups
            if (!empty($groups) && !in_array($process['group'], $groups)) {
                continue;
            }

            $processes[$cnt] = new Process($process['name'], $process['group'], $this->rpcClient);
        }

        return $processes;
    }
610804
public function execute(Process $process, $name = null)
    {
        if (!is_null($name)) {
            $process->name($name);
        }
        if (!$process->isStarted()) {
            $process->start();
        }

        return array_push($this->processes, $process);
    }
1024610
public function getServices()
	{
		$this->_zendAmfServer = ZendAmfServiceBrowser::$ZEND_AMF_SERVER;
		
		$methods = $this->_zendAmfServer->getFunctions();

		$methodsTable = '<methods>';
		foreach ($methods as $method => $value)
		{
			
			$functionReflection = $methods[ $method ];
			
			$parameters = $functionReflection->getParameters();
			
			$methodsTable = $methodsTable . "<method name='$method'>";
			
			foreach ($parameters as $param)
			{
				$methodsTable = $methodsTable . "<param name='$param->name'/>";
			}
			
			$methodsTable = $methodsTable . "</method>";
		}
		
		$methodsTable = $methodsTable . '</methods>';
		
		unset( $methods );
		return $methodsTable;
	}
768691
private function getDescriptors(): array
    {
        if ($this->input instanceof \Iterator) {
            $this->input->rewind();
        }
        if ('\\' === \DIRECTORY_SEPARATOR) {
            $this->processPipes = new WindowsPipes($this->input, !$this->outputDisabled || $this->hasCallback);
        } else {
            $this->processPipes = new UnixPipes($this->isTty(), $this->isPty(), $this->input, !$this->outputDisabled || $this->hasCallback);
        }

        return $this->processPipes->getDescriptors();
    }
257265
public function getProcessesInfo() : array {
        $processIds = [];
        $processes  = [];
        $data       = [];

        exec('pgrep php', $processIds);
        exec('ps ahxwwo pid:1,command:1 | grep php | grep -v grep | grep -v emacs', $processes);

        foreach($processes as $process) {
            $pid = explode(' ', trim($process), 2)[0];

            if( in_array($pid, $processIds) ) {
                $data[] = new ProcessInfo($process);
            }
        }

        return $data;
    }
1228547
public function listAllRunningSchedulesAction()
    {
        $processManager = Mage::getModel('aoe_scheduler/processManager'); /* @var $processManager Aoe_Scheduler_Model_ProcessManager */
        foreach ($processManager->getAllRunningSchedules() as $schedule) { /* @var $schedule Aoe_Scheduler_Model_Schedule */
            $status = $schedule->isAlive();
            if (is_null($status)) {
                $status = '?';
            } else {
                $status = $status ? 'alive' : 'dead (updating status to "disappeared")';
            }
            echo sprintf(
                "%-30s %-10s %-10s %-10s %-10s\n",
                $schedule->getJobCode(),
                $schedule->getHost() ? $schedule->getHost() : '(no host)',
                $schedule->getPid() ? $schedule->getPid() : '(no pid)',
                $schedule->getLastSeen() ? $schedule->getLastSeen() : '(never)',
                $status
            );
        }
    }
1203722
public function entityAction()
    {
        $page = (int)$this->getEvent()->getRouteMatch()->getParam('page');
        $entityClass = $this->getEvent()->getRouteMatch()->getParam('entityClass');

        return array(
            'entityClass' => $entityClass,
            'page' => $page,
        );
    }
827001
public function process()
    {
        $pages = $this->pages;

        foreach ($this->plugins as $plugin)
        {
            $pages = $plugin($pages);
        }
        
        return $pages ?: [];
    }
881271
protected function getProcesses()
    {
        $data = $this->getCommand()->run();

        $parser = new TopProcessParser($data);
        $parser->parse();

        return $parser->getProcesses();
    }
41083
public function getActions()
    {
        $actions = $this->actions;
        if (!empty($this->unclassifiedProcessors)) {
            $time = 0;
            foreach ($this->unclassifiedProcessors as $processor) {
                if (array_key_exists('time', $processor)) {
                    $time += $processor['time'];
                }
            }
            $actions[] = [
                'name'       => 'unclassified processors',
                'time'       => $time,
                'processors' => $this->unclassifiedProcessors
            ];
        }

        return $actions;
    }
1187471
protected function processSteps()
    {
        return [
            Steps\CheckConditionsAndSetup::class,

            Steps\StubReplaceSimple::class,
            Steps\StubReplaceAttributeData::class,
            Steps\StubReplaceRelationData::class,
            Steps\StubReplaceAccessorsAndMutators::class,
            Steps\StubReplaceSluggableData::class,
            Steps\StubReplaceScopes::class,
            Steps\StubReplaceDocBlock::class,
            Steps\StubReplaceImportsAndTraits::class,

            Steps\WriteFile::class,
        ];
    }
87283
public function monitoring()
    {
        return collect(app(SupervisorRepository::class)->all())
            ->pluck('pid')
            ->pipe(function ($processes) {
                $processes->each(function ($process) use (&$processes) {
                    $processes = $processes->merge($this->exec->run("pgrep -P {$process}"));
                });

                return $processes;
            })
            ->merge(
                Arr::pluck(app(MasterSupervisorRepository::class)->all(), 'pid')
            )->all();
    }
210656
protected function _processes()
    {
        if (CommonFunctions::executeProgram('ps', 'aux', $bufr, PSI_DEBUG)) {
            $lines = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
            $processes['*'] = 0;
            foreach ($lines as $line) {
                if (preg_match("/^\S+\s+\d+\s+\S+\s+\S+\s+\d+\s+\d+\s+\S+\s+(\w)/", $line, $ar_buf)) {
                    $processes['*']++;
                    $state = $ar_buf[1];
                    if ($state == 'L') $state = 'D'; //linux format
                    elseif ($state == 'I') $state = 'S';
                    if (isset($processes[$state])) {
                        $processes[$state]++;
                    } else {
                        $processes[$state] = 1;
                    }
                }
            }
            if ($processes['*'] > 0) {
                $this->sys->setProcesses($processes);
            }
        }
    }
1320454
public function process() {
		$result = [
			'success' => false,
			'error' => [],
			'count' => 0,
			'legend' => [],
		];
		if (empty($this->data)) {
			Throw new \Exception('You must specify "data" parameter.');
		}
		// if we have fixes to the data
		if (method_exists($this, 'overrides')) {
			$this->overrides();
		}
		// enable gc
		gc_enable();
		// processing one by one
		foreach (array_keys($this->data) as $k) {
			// we continue if we have no rows
			if (count($this->data[$k]['data']) == 0) continue;
			// object
			$model = $this->data[$k]['options']['model'];
			// we exit if primary model does not exists
			$object = new $model();
			$db_object = null;
			$collection_object = null;
			$flag_collection = false;
			// regular model
			$primary_model_name = null;
			$primary_model_object = null;
			if (is_a($object, '\Object\Table')) {
				if (!$object->dbPresent()) continue;
				$db_object = $object->db_object;
				// collection options
				$collection_options = [];
				if (!empty($this->data[$k]['options']['pk'])) {
					$collection_options['pk'] = $this->data[$k]['options']['pk'];
				}
				$collection_options['skip_acl'] = true;
				$collection_object = $model::collectionStatic($collection_options);
			} else if (is_a($object, '\Object\Collection')) { // collections
				if (!$object->primary_model->dbPresent()) continue;
				$collection_object = new $model(['skip_acl' => true]);
				$db_object = $collection_object->primary_model->db_object;
				$flag_collection = true;
			}
			unset($object);
			// start transaction
			if (!empty($db_object)) {
				$db_object->begin();
			}
			// counter & buffer
			$counter = 0;
			$buffer = [];
			do {
				// grab first element from the array
				$v2 = array_shift($this->data[$k]['data']);
				// we need to process overrides
				foreach ($v2 as $k3 => $v3) {
					// if we have a detail
					if (is_array($v3)) {
						foreach ($v3 as $k4 => $v4) {
							foreach ($v4 as $k5 => $v5) {
								if (is_array($v5)) {
									foreach ($v5 as $k6 => $v6) {
										foreach ($v6 as $k7 => $v7) {
											if (strpos($v7, '::id::') === 0) {
												$temp = $this->findAliasedValue($k7, $v7);
												if ($temp !== false) $v2[$k3][$k4][$k5][$k6][$k7] = $temp;
											}
										}
									}
								} else {
									if (!is_string($v5)) continue;
									if (is_numeric($k5)) continue;
									// if we need id
									if (strpos($v5, '::id::') === 0) {
										$temp = $this->findAliasedValue($k5, $v5);
										if ($temp !== false) $v2[$k3][$k4][$k5] = $temp;
									}
								}
							}
						}
					} else if (is_string($v3)) {
						// primary model
						if (strpos($v3, '::primary_model::') === 0) {
							$primary_model_name = str_replace('::primary_model::', '', $v3);
							$primary_model_object = new $primary_model_name();
							$v3 = '::id::' . $primary_model_name;
						}
						// if we need id
						if (strpos($v3, '::id::') === 0) {
							$temp = $this->findAliasedValue($k3, $v3);
							if ($temp !== false) $v2[$k3] = $temp;
							continue;
						}
						// from columns
						if (strpos($v3, '::from::') === 0) {
							$v3 = explode('::', str_replace('::from::', '', $v3));
							$first_type = trim(array_shift($v3));
							$temp = $primary_model_object->{$first_type};
							end($v3);
							$last_type = $v3[key($v3)];
							$v3 = array_key_get($temp, $v3);
							// some overrides
							if ($first_type == 'columns') {
								if ($last_type == 'domain') {
									$v3 = \Object\Data\Domains::getNonSequenceDomain($v3);
								}
								if ($last_type == 'type') {
									$v3 = \Object\Data\Types::getNonSequenceType($v3);
								}
							}
							$v2[$k3] = $v3;
							continue;
						}
					}
				}
				// we need to fix primary keys for details
				if ($flag_collection && !empty($collection_object->data['details'])) {
					foreach ($collection_object->data['details'] as $k25 => $v25) {
						if (empty($v2[$k25])) continue;
						if ($v25['type'] != '1M') continue;
						$temp_key = [];
						foreach ($v25['map'] as $k26 => $v26) {
							$temp_key[$v26] = $v2[$k26];
						}
						foreach ($v2[$k25] as $k27 => $v27) {
							$temp_key2 = [];
							foreach ($v25['pk'] as $v26) {
								$temp_key2[] = $temp_key[$v26] ?? $v27[$v26] ?? null;
							}
							$temp_key2 = implode('::', $temp_key2);
							unset($v2[$k25][$k27]);
							$v2[$k25][$temp_key2] = $v27;
						}
					}
				}
				// add value to buffer
				$buffer[] = $v2;
				// if buffer has 250 rows or we have no data
				if (count($buffer) > 249 || (count($buffer) > 0 && count($this->data[$k]['data']) == 0)) {
					// merge
					$result_insert = $collection_object->mergeMultiple($buffer, [
						'skip_optimistic_lock' => true
					]);
					if (!$result_insert['success']) {
						$result['error'] = $result_insert['error'];
						return $result;
					}
					// # of records and number of changes
					$counter+= $result_insert['count'];
					$buffer = [];
					// free up memory
					gc_collect_cycles();
				}
			} while (count($this->data[$k]['data']) > 0);
			// commit transaction
			if (!empty($db_object)) {
				$db_object->commit();
			}
			// legend
			$result['legend'][] = '         * Process ' . $k . ' changes ' . $counter;
			$result['count']+= $counter;
		}
		if (!empty($result['count'])) {
			array_unshift($result['legend'], '       * import');
		}
		$result['success'] = true;
		return $result;
	}
878404
public function getProcessedFields()
    {
        return [
            'page'    => $this->getPage(),
            'perPage' => $this->getPerPage(),
            'filter'  => $this->filter,
            'orderBy' => $this->orderBy,
            'query'   => $this->searchQuery
        ];
    }