Mais conteúdo relacionado Semelhante a Plone and Drupal -- CMS Coexistance in Higher Education (13) Mais de Calvin Hendryx-Parker (8) Plone and Drupal -- CMS Coexistance in Higher Education1. Plone and Drupal:
CMS Coexistence in Higher Education
Calvin Hendryx-Parker
CTO
June 18th, 2014 #psm14
8. #psm14
How do you control
web branding, content
& infrastructure?
Source: http://www.jaquesamerica.com
19. #psm14
/**
* Put stuff in the queue
*/
function pushhub_notify($nids, $topic='shared.xml', $timeout=60){
$hub_url = variable_get('pushhub_huburl', 'http://example.com/hub');
Resque::setBackend('localhost:6379');
$headers = array('Content-Type' => 'application/x-www-form-urlencoded');
$topic_url = url("pushhub/" . $topic, array('absolute' => TRUE));
$payload = array('hub.mode' => 'publish',
'hub.url' => $topic_url);
$hub_endpoint = $hub_url . "/publish";
# Add the job to the queue
Resque::enqueue('default', 'Post', array($hub_endpoint, $payload,
$headers, $timeout));
}
20. #psm14
class Post {
public function perform() {
$endpoint_url = $this->args[0];
$payload = $this->args[1];
$headers = $this->args[2];
$timeout = $this->args[3];
$request = Requests::post($endpoint_url, $headers, $payload,
array('timeout' => $timeout));
}
}