function hosting_site_post_hosting_verify_task in Hosting 7.4
Same name and namespace in other branches
- 5 site/hosting_site.drush.inc \hosting_site_post_hosting_verify_task()
- 6.2 site/hosting_site.drush.inc \hosting_site_post_hosting_verify_task()
- 7.3 site/hosting_site.drush.inc \hosting_site_post_hosting_verify_task()
Implements hook_post_hosting_verify_task().
1 call to hosting_site_post_hosting_verify_task()
- hosting_site_post_hosting_deploy_task in site/
hosting_site.drush.inc - Implements hook_post_hosting_deploy_task().
File
- site/
hosting_site.drush.inc, line 297 - Drush hooks for the Hosting site module.
Code
function hosting_site_post_hosting_verify_task($task, $data) {
if ($task->ref->type == 'site') {
// Run hook_post_hosting_verify_task() on the platform for this site.
$platform_task = _drush_hosting_task_create_platform_task($task);
$platform_data = $data;
hosting_platform_post_hosting_verify_task($platform_task, $platform_data);
$task->ref->verified = REQUEST_TIME;
$task->ref->no_verify = TRUE;
$task->ref->db_name = $data['self']['db_name'];
if ($data['context']['cron_key']) {
$task->ref->cron_key = $data['context']['cron_key'];
}
node_save($task->ref);
// @TODO: The $data from the function param seems to always be empty, if we figure out how to populate it from drush_hosting_task() remove this.
// @see hosting_platform_post_hosting_verify_task()
// $data = provision_backend_invoke($task->ref->hosting_name, "provision-packages");
// Populate site package data
$packages_drupal = drush_get_option('packages', array(), 'drupal');
hosting_package_sync($packages_drupal);
$packages_site = drush_get_option('packages', array(), 'site');
hosting_package_sync($packages_site);
hosting_package_instance_sync($task->ref->nid, $task->ref->type, $packages_drupal, $packages_site);
}
}