# |
Jul 19th 2021, 18:58 |
kevin.pfeifer |
well what is the reason that it should actually happen after the response and not before? |
# |
Jul 19th 2021, 18:55 |
sebastiansperandio093 |
response code should be 200 or 201 |
# |
Jul 19th 2021, 18:55 |
sebastiansperandio093 |
it doesnt work |
# |
Jul 19th 2021, 18:55 |
sebastiansperandio093 |
```$this->response = $this->response->withStatus(201); $this->response->send(); echo 'hello';exit;``` |
# |
Jul 19th 2021, 18:54 |
sebastiansperandio093 |
hello everyone, can I send a response 200 and continue processing php after sending it? |
# |
Jul 19th 2021, 17:13 |
admad |
"Task failed successfully" |
# |
Jul 19th 2021, 17:10 |
tyler.adam.lazenby |
I had just migrated from using users to reference contacts to accounts |
# |
Jul 19th 2021, 17:10 |
tyler.adam.lazenby |
i found the issue |
# |
Jul 19th 2021, 17:10 |
kevin.pfeifer |
because according to https://github.com/dereuromark/cakephp-queue/blob/c7f0386218387d7fd9dba2781449fcfbb984e59d/src/Queue/Processor.php#L206 you get that message in the worker if any exception is being thrown inside your task |
# |
Jul 19th 2021, 17:10 |
tyler.adam.lazenby |
Gawwww |
# |
Jul 19th 2021, 17:09 |
tyler.adam.lazenby |
I am importing data from a csv file into my database to create or update contacts |
# |
Jul 19th 2021, 17:08 |
kevin.pfeifer |
can you maybe provide the content of your task you try to run with the worker? |
# |
Jul 19th 2021, 17:04 |
tyler.adam.lazenby |
yes |
# |
Jul 19th 2021, 17:03 |
kevin.pfeifer |
so your task can successfully be added to the queue but when the worker tries to process it you get "task did not finish" ? |
# |
Jul 19th 2021, 17:02 |
tyler.adam.lazenby |
job did not finish |
# |
Jul 19th 2021, 17:01 |
tyler.adam.lazenby |
looking into that |
# |
Jul 19th 2021, 17:01 |
tyler.adam.lazenby |
now I am just getting "task did not finish" |
# |
Jul 19th 2021, 17:01 |
tyler.adam.lazenby |
No |
# |
Jul 19th 2021, 16:57 |
kevin.pfeifer |
did that fix your problem? |
# |
Jul 19th 2021, 16:46 |
tyler.adam.lazenby |
thank you |
# |
Jul 19th 2021, 16:43 |
tyler.adam.lazenby |
I will now |
# |
Jul 19th 2021, 16:42 |
kevin.pfeifer |
have you read https://github.com/dereuromark/cakephp-queue/tree/master/docs#coming-from-v5-to-v6 ? |
# |
Jul 19th 2021, 16:41 |
tyler.adam.lazenby |
help |
# |
Jul 19th 2021, 16:33 |
tyler.adam.lazenby |
```2021-07-19 10:32:35 Error: [PDOException] SQLSTATE[42S22]: Column not found: 1054 Unknown column 'QueuedJobs.job_task' in 'where clause' in C:\xampp\htdocs\ezBusinessManager\vendor\cakephp\cakephp\src\Database\Statement\MysqlStateme nt.php on line 39``` |
# |
Jul 19th 2021, 16:16 |
dereuromark |
As for the naming, I see an issue of `implements addInterface` vs AddInterface (casing matters), but it might not be relevant for this case. |
# |
Jul 19th 2021, 16:16 |
dereuromark |
Tip: upgrade to v6, it has a few better ways to directly detect issues with e.g. naming |
# |
Jul 19th 2021, 16:15 |
tyler.adam.lazenby |
https://pastebin.com/SBWFhtzm |
# |
Jul 19th 2021, 16:14 |
tyler.adam.lazenby |
https://pastebin.com/ifdkDas5 |
# |
Jul 19th 2021, 16:13 |
tyler.adam.lazenby |
ok \ |
# |
Jul 19th 2021, 16:12 |
dereuromark |
You might need to "pastebin" the whole code, incl path, maybe someone sees your mistake |
# |
Jul 19th 2021, 16:11 |
tyler.adam.lazenby |
and I have run the phpstorm generate and the annotate all |
# |
Jul 19th 2021, 16:11 |
tyler.adam.lazenby |
yes |
# |
Jul 19th 2021, 16:11 |
dereuromark |
something, usually a typo somewhere, or missing use statement. are you using PHPStorm or a high level IDE? |
# |
Jul 19th 2021, 16:10 |
tyler.adam.lazenby |
what did you mean the sth? @dereuromark |
# |
Jul 19th 2021, 16:10 |
tyler.adam.lazenby |
I am still not finding the issue |
# |
Jul 19th 2021, 15:50 |
slackebot2 |
year due to various tweaks to “bake” and the IDE Helper. |
# |
Jul 19th 2021, 15:50 |
ewbarnard |
General comment - I use the @dereuromark IdeHelper now as part of my workflow and it surely does help PhpStorm to help me. I’ve decided to rely entirely on “bake” code generator for Entity/Table class generation followed by invoking illuminator + annotate. My own Model-related code goes in a Repository/ folder specific to the feature I’m developing. I’m pretty sure this approach only became possible over the past |
# |
Jul 19th 2021, 15:42 |
dereuromark |
you might not properly implement the base task or sth. Make sure to always use the IdeHelper autocomplete as well, it will also give you hints about invalid task setup. |
# |
Jul 19th 2021, 15:41 |
tyler.adam.lazenby |
But for some reason, this task won't run when I use `bin/cake queue runworker` |
# |
Jul 19th 2021, 15:40 |
tyler.adam.lazenby |
```^C-bash-4.2$ env PATH="/opt/plesk/php/8.0/bin:$PATH" bin/cake queue stats Total unfinished jobs: 1 Running workers (processes): 0 Server name: plesk04.eznettools.net --------------------------------------------------------------- Jobs currently in the queue: - AddContacts : 1 --------------------------------------------------------------- Finished job statistics:``` |
# |
Jul 19th 2021, 15:40 |
tyler.adam.lazenby |
@dereuromark I can't seem to figure out why this task isn't being picked up by the runner |