# |
Jun 25th 2019, 07:38 |
admad |
bake themes are plugins |
# |
Jun 25th 2019, 07:18 |
imonsei |
if i want to add a "isAuthorized" template to the "cake bake controller foo" command (so i get a isAuthorized function in my controller in addition to the add-edit-delete etc), should I use a bake theme or a plugin? |
# |
Jun 25th 2019, 06:44 |
imonsei |
hia everybooty o/ |
# |
Jun 25th 2019, 06:40 |
sab |
nnn |
# |
Jun 25th 2019, 06:40 |
sab |
moring |
# |
Jun 25th 2019, 06:30 |
madbbb |
Good Morning! |
# |
Jun 25th 2019, 05:42 |
conehead |
Personally I am passing the data to the view. I think it is more important if you show the data the same way somewhere else and not just on a single page |
# |
Jun 25th 2019, 05:39 |
sab |
okay, appreciate the input |
# |
Jun 25th 2019, 05:38 |
niel45 |
that's if you want to do the accessing in the template. You could also use elements with the controller passing the data into it. Really depends how you want to do it ;-) |
# |
Jun 25th 2019, 05:37 |
niel45 |
if you need access to your models, you'd probably want to use cells |
# |
Jun 25th 2019, 05:34 |
sab |
Or none of it |
# |
Jun 25th 2019, 05:33 |
sab |
Hi, just a short question: If I'd like to create a dashboard, would I do that with cells or elements? |
# |
Jun 24th 2019, 19:44 |
jeremyharris |
oh, there ya go ;) |
# |
Jun 24th 2019, 19:44 |
jeremyharris |
this error is saying you are using Query::join as a getter but it doesn’t work as one anymore. You should find any places in your app using Query::join to read the join (rather than set it) and upgrade to Query::clause |
# |
Jun 24th 2019, 19:44 |
madbbb |
ha-ha. it is Query::clause("join") |
# |
Jun 24th 2019, 19:36 |
madbbb |
upgrading my cake to 3.7 and stuck with ```Using Query::join() to read state is deprecated. Use clause("join") instead.``` where do I put that clause? |
# |
Jun 24th 2019, 19:35 |
dereuromark |
the quickest one. if you need it, sure. u can also have many workers this way. |
# |
Jun 24th 2019, 19:12 |
challgren |
Start every minute? |
# |
Jun 24th 2019, 19:11 |
dereuromark |
i use 2 min interval and shorter life span. always 3 parallel. depends on the max running task. |
# |
Jun 24th 2019, 18:44 |
challgren |
This is my config and I have a crontab that starts `bin/cake queue runworker` every 10 minutes, So I always have 2 queue running at one time |
# |
Jun 24th 2019, 18:44 |
joey.mukherjee |
Thank you so much!! The line I was missing was use Queue\Shell\Task\QueueTask; |
# |
Jun 24th 2019, 18:43 |
joey.mukherjee |
Oh wow, I didn't know I could click on it. Cool. Thank you! |
# |
Jun 24th 2019, 18:42 |
challgren |
You queue table might have bad jobs in it too |
# |
Jun 24th 2019, 18:42 |
challgren |
Follow my sample I just posted, it works fine for me and I have no issues |
# |
Jun 24th 2019, 18:41 |
joey.mukherjee |
No, I had `namespace Queue\Shell\Task;` at the start. When I put App instead of Queue, I get "Class 'App\Shell\Task\QueueTask' not found " |
# |
Jun 24th 2019, 18:40 |
challgren |
This is my sample job called ‘SendCustomer’ |
# |
Jun 24th 2019, 18:40 |
challgren |
Does the file have `namespace App\Shell\Task;` at the start? |
# |
Jun 24th 2019, 18:39 |
joey.mukherjee |
Yes! I have that! I think I am doing that part right. However, it only works if I put it under vendors.. with the other examples. :( I am trying to move it in my source tree. |
# |
Jun 24th 2019, 18:37 |
challgren |
$queue->createJob(‘Movie’, $data, [‘group’ => ‘email’, ‘reference’ => $entity->get(‘id’)]); |
# |
Jun 24th 2019, 18:37 |
challgren |
Your job name when creating the is Movie |
# |
Jun 24th 2019, 18:36 |
joey.mukherjee |
My file is called QueueMovieTask.php and is in /src/Shell/Task. But when I run cake queue, I get "Exception: Task `QueueMovie` not found". My namespace is Queue\Shell\Task, and I have "class QueueMovieTask extends QueueTask {" at the start. Is one of those wrong? |
# |
Jun 24th 2019, 18:22 |
challgren |
Your Task also needs to be named QueueMyCustomJobTask |
# |
Jun 24th 2019, 18:21 |
challgren |
@joey.mukherjee https://github.com/dereuromark/cakephp-queue/tree/master/docs#writing-your-own-task |
# |
Jun 24th 2019, 18:18 |
joey.mukherjee |
Thanks all for your help on my queue issues. I just went with cron and have it checking every minute. Anyway, I made a Queue task using dereuromark/cakephp-queue. However, the only way it works is if I put it in vendor/dereuromark/cakephp-queue/src/Shell/Task. The docs say to put it in src/Shell/Task, but it isn't found if I put it there. Any ideas on what I am doing wrong? |
# |
Jun 24th 2019, 17:23 |
daniel.upshaw |
Thanks @admad |
# |
Jun 24th 2019, 17:21 |
daniel.upshaw |
It's a bit confusing confusing |
# |
Jun 24th 2019, 17:21 |
daniel.upshaw |
I think that does it though |
# |
Jun 24th 2019, 17:21 |
daniel.upshaw |
That works in `beforeRender`, and not in the public method |
# |
Jun 24th 2019, 17:20 |
daniel.upshaw |
Wooot! `$this->RequestHandler->renderAs($this, null);` |
# |
Jun 24th 2019, 17:19 |
admad |
apparently it skips setting the templatepath if you have already set view classname. So try doing that in your action method |
# |
Jun 24th 2019, 17:18 |
daniel.upshaw |
Hmm `_renderType` |