You are here

function drush_recommender in Recommender API 7.4

Same name and namespace in other branches
  1. 7.5 recommender.drush.inc \drush_recommender()

File

./recommender.drush.inc, line 32

Code

function drush_recommender($app_name, $description = NULL) {
  recommender_create_command($app_name, $description);

  // fixme: this doesn't look right: it only retrieves the last execution_id, not the newly created one.
  $rec = recommender_app_load($app_name);
  if ($rec) {
    drush_print("Successfully created run-recommender request with ID: {$rec['execution_id']}");
  }
  else {
    drush_print('Cannot create run-recommender request');
  }
}