Skip to content

Instantly share code, notes, and snippets.

@kargirwar
Created November 18, 2017 13:13
Show Gist options
  • Save kargirwar/7c42e39d311fcdf0a5ad8186bb32b1da to your computer and use it in GitHub Desktop.
Save kargirwar/7c42e39d311fcdf0a5ad8186bb32b1da to your computer and use it in GitHub Desktop.
<?php
function __construct() {
# Create our worker object.
$this->mWorker = new \GearmanWorker();
# Add default server (localhost).
$this->mWorker->addServer();
$this->mWorker->addFunction(Client::JOB_TYPE_REPORT, [$this, "report"]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment