Tired of all the back and forth in this thread my colleague Amit wrote this blog post
http://www.sanisoft.com/blog/2012/06/28/cakephp-do-dlrow-olleh-using-gearman/ That should solve most of your problems :-) Tarique On Thu, Jun 28, 2012 at 8:56 AM, Dr. Tarique Sani <[email protected]> wrote: > public $uses = array('User'); > > Will give you the $this->User in your shell - what is the problem? > > Tarique > > On Wed, Jun 27, 2012 at 10:56 PM, baur79 <[email protected]> wrote: >> gearman working good outside of cakephp as plan PHP >> but my need is to use in cakephp shell, so to use ORM of cakephp models >> >> >> On Wednesday, June 27, 2012 3:22:08 PM UTC+6, Dr. Tarique Sani wrote: >>> >>> On Wed, Jun 27, 2012 at 1:05 PM, baur79 <[email protected]> wrote: >>> > i'm about how to run function in >>> > class GrmShell extend AppShell >>> > >>> > public function main() { >>> > $this->worker = new gearmanworker() >>> > $this->worker->addFunction("func", "func_my"); >>> > } >>> > >>> > public function func_my() { >>> > // run logic >>> > } >>> > >>> >>> Ummm.... I have lost you here... You have to start the worker and let it >>> run. >>> >>> When ever a worker receives a job it will run. >>> >>> Have you tried running gearman examples without cakePHP? >>> >>> Tarique >>> >>> -- >>> ============================================================= >>> PHP for E-Biz: http://sanisoft.com >>> ============================================================= >> >> >> On Wednesday, June 27, 2012 3:22:08 PM UTC+6, Dr. Tarique Sani wrote: >>> >>> On Wed, Jun 27, 2012 at 1:05 PM, baur79 <[email protected]> wrote: >>> > i'm about how to run function in >>> > class GrmShell extend AppShell >>> > >>> > public function main() { >>> > $this->worker = new gearmanworker() >>> > $this->worker->addFunction("func", "func_my"); >>> > } >>> > >>> > public function func_my() { >>> > // run logic >>> > } >>> > >>> >>> Ummm.... I have lost you here... You have to start the worker and let it >>> run. >>> >>> When ever a worker receives a job it will run. >>> >>> Have you tried running gearman examples without cakePHP? >>> >>> Tarique >>> >>> -- >>> ============================================================= >>> PHP for E-Biz: http://sanisoft.com >>> ============================================================= >> >> >> On Wednesday, June 27, 2012 3:22:08 PM UTC+6, Dr. Tarique Sani wrote: >>> >>> On Wed, Jun 27, 2012 at 1:05 PM, baur79 <[email protected]> wrote: >>> > i'm about how to run function in >>> > class GrmShell extend AppShell >>> > >>> > public function main() { >>> > $this->worker = new gearmanworker() >>> > $this->worker->addFunction("func", "func_my"); >>> > } >>> > >>> > public function func_my() { >>> > // run logic >>> > } >>> > >>> >>> Ummm.... I have lost you here... You have to start the worker and let it >>> run. >>> >>> When ever a worker receives a job it will run. >>> >>> Have you tried running gearman examples without cakePHP? >>> >>> Tarique >>> >>> -- >>> ============================================================= >>> PHP for E-Biz: http://sanisoft.com >>> ============================================================= >> >> -- >> Our newest site for the community: CakePHP Video Tutorials >> http://tv.cakephp.org >> Check out the new CakePHP Questions site http://ask.cakephp.org and help >> others with their CakePHP related questions. >> >> >> To unsubscribe from this group, send email to >> [email protected] For more options, visit this group at >> http://groups.google.com/group/cake-php > > > > -- > ============================================================= > PHP for E-Biz: http://sanisoft.com > ============================================================= -- ============================================================= PHP for E-Biz: http://sanisoft.com ============================================================= -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
