Example #1
0
 public function __construct($function, Logger $logger = null)
 {
     $this->function = $function;
     $this->mongo = new \MongoClient(Config::$get->database->mongodb);
     if (!$logger) {
         $this->logger = new DefaultLogger('worker');
     } else {
         $this->logger = $logger;
     }
     parent::__construct();
 }