New process table for a better detection of running workers

This commit is contained in:
Michael Vogel 2016-09-09 20:33:54 +00:00
parent 5ebeb7e85c
commit 22f32d9721
23 changed files with 107 additions and 13 deletions

View file

@ -1114,6 +1114,17 @@ function db_definition() {
"choice" => array("choice"),
)
);
$database["process"] = array(
"fields" => array(
"pid" => array("type" => "int(10) unsigned", "not null" => "1", "primary" => "1"),
"command" => array("type" => "varchar(32)", "not null" => "1", "default" => ""),
"created" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"),
),
"indexes" => array(
"PRIMARY" => array("pid"),
"command" => array("command"),
)
);
$database["profile"] = array(
"fields" => array(
"id" => array("type" => "int(11)", "not null" => "1", "extra" => "auto_increment", "primary" => "1"),
@ -1456,6 +1467,8 @@ function dbstructure_run(&$argv, &$argc) {
unset($db_host, $db_user, $db_pass, $db_data);
}
$a->start_process();
if ($argc==2) {
switch ($argv[1]) {
case "update":