Worker: New method for running background processes

This commit is contained in:
Michael Vogel 2015-09-09 22:42:31 +02:00
parent 1c19bcd322
commit 17b1d45968
3 changed files with 101 additions and 3 deletions

View file

@ -1382,6 +1382,20 @@ function db_definition() {
"username" => array("username"),
)
);
$database["workerqueue"] = array(
"fields" => array(
"id" => array("type" => "int(11)", "not null" => "1", "extra" => "auto_increment", "primary" => "1"),
"parameter" => array("type" => "text", "not null" => "1"),
"priority" => array("type" => "tinyint(3) unsigned", "not null" => "1", "default" => "0"),
"created" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"),
"pid" => array("type" => "int(11)", "not null" => "1", "default" => "0"),
"executed" => array("type" => "datetime", "not null" => "1", "default" => "0000-00-00 00:00:00"),
),
"indexes" => array(
"PRIMARY" => array("id"),
"created" => array("created"),
)
);
return($database);
}