@@ -37,7 +37,7 @@ public function initialize() {
37
37
38
38
foreach (App::path ('shells ' ) as $ path ) {
39
39
$ folder = new Folder ($ path . DS . 'Task ' );
40
- $ this ->tasks = array_merge ($ this ->tasks , $ folder ->find ('Queue .*\.php ' ));
40
+ $ this ->tasks = array_merge ($ this ->tasks , $ folder ->find ('queue .*\.php ' ));
41
41
}
42
42
// strip the extension fom the found task(file)s
43
43
foreach ($ this ->tasks as &$ task ) {
@@ -110,8 +110,8 @@ public function add() {
110
110
} else {
111
111
if (in_array ($ this ->args [0 ], $ this ->taskNames )) {
112
112
$ this ->{$ this ->args [0 ]}->add ();
113
- } elseif (in_array ('queue_ ' . $ this ->args [0 ], $ this ->taskNames )) {
114
- $ this ->{'queue_ ' . $ this ->args [0 ]}->add ();
113
+ } elseif (in_array ('queue ' . $ this ->args [0 ], $ this ->taskNames )) {
114
+ $ this ->{'queue ' . $ this ->args [0 ]}->add ();
115
115
} else {
116
116
$ this ->out ('Error: ' );
117
117
$ this ->out (' Task not found: ' . $ this ->args [0 ], 2 );
@@ -152,7 +152,7 @@ public function runworker() {
152
152
} else {
153
153
if ($ data !== false ) {
154
154
$ this ->out ('Running Job of type " ' . $ data ['jobtype ' ] . '" ' );
155
- $ taskname = 'queue_ ' . strtolower ( $ data ['jobtype ' ]) ;
155
+ $ taskname = 'queue ' . $ data ['jobtype ' ];
156
156
$ jobData = unserialize ($ data ['data ' ]);
157
157
if (!$ this ->{$ taskname }->canRun ($ jobData )) {
158
158
$ this ->QueuedTask ->requeueJob ($ data ['id ' ], $ this ->getTaskConf ($ taskname , 'timeout ' ));
0 commit comments