You are here

function recommender_run in Recommender API 7.6

Same name and namespace in other branches
  1. 6.2 recommender.module \recommender_run()
1 call to recommender_run()
recommender_overview_submit in ./recommender.module

File

./recommender.module, line 90

Code

function recommender_run() {
  $count = 0;
  while ($record = computing_claim('recommender')) {
    drupal_set_message(t("Processing recommender computation: !id", array(
      '!id' => $record->id,
    )));
    recommender_process_record($record);
    computing_update($record);
    $count++;
  }
  if ($count > 0) {
    drupal_set_message(t('Successfully run recommender.'));
  }
  else {
    drupal_set_message(t('No recommender command to run.'), 'warning');
  }
}