You are here

function recommender_create_command in Recommender API 6.3

Same name and namespace in other branches
  1. 7.3 recommender.module \recommender_create_command()
  2. 7.4 recommender.module \recommender_create_command()
2 calls to recommender_create_command()
recommender_cron in ./recommender.module
recommender_settings_form_submit in ./recommender.admin.inc

File

./recommender.module, line 137
Providing generic recommender system algorithms.

Code

function recommender_create_command($app_name) {
  $command = "runRecommender()";
  $app_id = recommender_app_load($app_name, TRUE);
  $execution_id = async_command_create_command('recommender', $command, array(
    'eid' => $app_id,
  ));
  if ($execution_id) {
    db_query("UPDATE {recommender_app} SET execution_id = %d WHERE name = '%s'", $execution_id, $app_name);
  }
  drupal_set_message(t('Your request "@command" in the queue. It will be executed asynchronously. Please refresh the page to see the update.', array(
    '@command' => $command,
  )));
}