php: queue / dont delay the user -
i have piece of code takes while run , low priority. wondering if in php can like
public function put () { $comment = array('title' => 'my title', 'description' => 'my description'); sendtoqueue($this->internalcall('controller' => 'comment', 'data' => $comment); $object = $this->get('id' => $this->id); return $object; }
where function inside sendtoqueue wouldnt delay $object being fetching , returned , run in bg.
possible? know can throw python ideally i'd run within current scope.
if need run in current scope fork (pcntl_fork()) process , let child handle whilst parent carries on
otherwise run script periodically empties queue of tasks.
Comments
Post a Comment