Skip to content

Instantly share code, notes, and snippets.

@alanmackenzie
Created August 30, 2012 09:59
Show Gist options
  • Save alanmackenzie/3525232 to your computer and use it in GitHub Desktop.
Save alanmackenzie/3525232 to your computer and use it in GitHub Desktop.
Fixes your Acquia Solr Search configuration after the down time on 28th Aug 2012.
<?php
/**
* @file
* This file contains a drush command to fix acquia solr service issues on
* the 28th Aug 2012.
* @see http://status.acquia.com/node/31
*/
/**
* Implements hook_drush_command().
*/
function acquia_fix_drush_command() {
$items = array();
$items['acquia-solr-fix'] = array(
'description' => "Fixes your Drupal installaion connection to acquia's managed solr search service.",
'examples' => array(
'drush acquia-solr-fix' => 'Fixes a broken solr installation that suffered an outage on 28th Aug 2012.',
),
'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_FULL,
);
return $items;
}
/**
* Drush command callback for acquia-solr-fix.
*/
function drush_acquia_fix_acquia_solr_fix() {
$form_state = array();
form_load_include($form_state, 'inc', 'acquia_agent', 'acquia_agent.pages');
drupal_form_submit('acquia_agent_settings_form', $form_state, '');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment