Merge pull request #2032 from fabrixxm/cron_update_suggestions
cron: move update_suggestions in separated thread
This commit is contained in:
commit
882e10c6e1
2 changed files with 7 additions and 2 deletions
|
@ -151,9 +151,10 @@ function cron_run(&$argv, &$argc){
|
||||||
|
|
||||||
update_contact_birthdays();
|
update_contact_birthdays();
|
||||||
|
|
||||||
update_suggestions();
|
proc_run('php',"include/discover_poco.php", "suggestions");
|
||||||
|
|
||||||
set_config('system','last_expire_day',$d2);
|
set_config('system','last_expire_day',$d2);
|
||||||
|
|
||||||
proc_run('php','include/expire.php');
|
proc_run('php','include/expire.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,8 @@ function discover_poco_run(&$argv, &$argc){
|
||||||
$mode = 1;
|
$mode = 1;
|
||||||
} elseif(($argc == 2) && ($argv[1] == "checkcontact")) {
|
} elseif(($argc == 2) && ($argv[1] == "checkcontact")) {
|
||||||
$mode = 2;
|
$mode = 2;
|
||||||
|
} elseif(($argc == 2) && ($argv[1] == "suggestions")) {
|
||||||
|
$mode = 3;
|
||||||
} elseif ($argc == 1) {
|
} elseif ($argc == 1) {
|
||||||
$search = "";
|
$search = "";
|
||||||
$mode = 0;
|
$mode = 0;
|
||||||
|
@ -69,7 +71,9 @@ function discover_poco_run(&$argv, &$argc){
|
||||||
|
|
||||||
logger('start '.$search);
|
logger('start '.$search);
|
||||||
|
|
||||||
if (($mode == 2) AND get_config('system','poco_completion'))
|
if ($mode==3)
|
||||||
|
update_suggestions();
|
||||||
|
elseif (($mode == 2) AND get_config('system','poco_completion'))
|
||||||
discover_users();
|
discover_users();
|
||||||
elseif (($mode == 1) AND ($search != "") and get_config('system','poco_local_search'))
|
elseif (($mode == 1) AND ($search != "") and get_config('system','poco_local_search'))
|
||||||
discover_directory($search);
|
discover_directory($search);
|
||||||
|
|
Loading…
Reference in a new issue