# |
Sep 8th 2019, 09:27 |
challgren |
For my app I first check for the existing zip if not create the zip, then create a queue task to clean up the zip in 1 hour and then send the file to user |
# |
Sep 8th 2019, 09:26 |
challgren |
Ok well you may miss responses from other people, but AFIK theres no correct way. The best way would be to generate it and send the zip and then clean up the temp file |
# |
Sep 8th 2019, 09:25 |
COOurb |
so I can't |
# |
Sep 8th 2019, 09:25 |
COOurb |
slack eats much RAM |
# |
Sep 8th 2019, 09:25 |
challgren |
Also if you join us on slack you can see responses that may come in after you log off irc |
# |
Sep 8th 2019, 09:25 |
COOurb |
Is there any example of correct way to do it? I mean, sending file without storing it permanently? |
# |
Sep 8th 2019, 09:24 |
COOurb |
yeah, got it. |
# |
Sep 8th 2019, 09:23 |
challgren |
You could add your task before calling return |
# |
Sep 8th 2019, 09:23 |
COOurb |
As I know there is no execution after it |
# |
Sep 8th 2019, 09:23 |
COOurb |
ok, but to send file to user I have to call 'return' or reach end of the action. |
# |
Sep 8th 2019, 09:23 |
challgren |
https://github.com/dereuromark/cakephp-queue |
# |
Sep 8th 2019, 09:22 |
COOurb |
queue task? |
# |
Sep 8th 2019, 09:21 |
challgren |
You should be able to, or maybe a queue task to clean it up in a couple minutes |
# |
Sep 8th 2019, 09:21 |
COOurb |
I mean, if I can't crete inmemory archive, can I send it then delete actual file? |
# |
Sep 8th 2019, 09:21 |
COOurb |
Hey, can i call some functions after sending file to user? |
# |
Sep 8th 2019, 09:20 |
COOurb |
nope |
# |
Sep 8th 2019, 09:16 |
challgren |
https://github.com/maennchen/ZipStream-PHP might be better |
# |
Sep 8th 2019, 09:15 |
challgren |
@coourb https://www.phpclasses.org/package/6110-PHP-Create-archives-of-compressed-files-in-ZIP-format.html might be helpful but its old |
# |
Sep 8th 2019, 08:43 |
COOurb |
But I dunno how |
# |
Sep 8th 2019, 08:42 |
COOurb |
inmemory archive |
# |
Sep 8th 2019, 08:42 |
COOurb |
inmempo= |
# |
Sep 8th 2019, 08:42 |
COOurb |
I think about creating archive but inmemry archive |
# |
Sep 8th 2019, 08:42 |
COOurb |
how* |
# |
Sep 8th 2019, 08:41 |
COOurb |
I need to send several files as response. Ho to do it? |
# |
Sep 7th 2019, 14:14 |
valerij.bancer |
So, technically it should not be a problem to move them to .env file, right? |
# |
Sep 7th 2019, 14:06 |
admad |
also the ones in phpunit.xml would be used only during testing |
# |
Sep 7th 2019, 14:05 |
admad |
because the phpunit.xml predates the adding of .env files support |
# |
Sep 7th 2019, 13:50 |
valerij.bancer |
Hi, is there a good reason why database credentials are stored in phpunit.xml but not in .env in 3.x? |
# |
Sep 7th 2019, 11:51 |
ashish_onmobile |
the problem with the baking of models |
# |
Sep 7th 2019, 11:51 |
ashish_onmobile |
fixed it |
# |
Sep 7th 2019, 11:27 |
ashish_onmobile |
is there anyone who can help me to understand how to save the data with associated table in friendsofcake crud plugin? |
# |
Sep 7th 2019, 09:50 |
challgren |
Morning @alexdd55976 |
# |
Sep 7th 2019, 08:58 |
alexdd55976 |
morning fellows |
# |
Sep 7th 2019, 01:23 |
slackebot |
instance, $connectionOne could query table 1, $connectionTwo could query table 2, etc but a single query cannot span multiple connections unless you setup federated connections within the database server or a query proxy server. |
# |
Sep 7th 2019, 01:23 |
jimbo2150 |
@itmpls I do not believe it is possible to have separate connections within a single query. Also, tables are not tied to connections. Your $table variables are likely query objects and you are setting the same connection on each. If you need separate connections you will need to either copy the connection into new connections or duplicate the connection in your app config but you cannot include separate connections in a single query. For |
# |
Sep 7th 2019, 00:34 |
itmpls |
checked for typos |
# |
Sep 7th 2019, 00:34 |
itmpls |
but table2 is? |
# |
Sep 7th 2019, 00:33 |
itmpls |
I'm doing something like $table1->setConnection('foo'); $table2->setConnection('foo'); $table3->setConnection('foo'); $results = $table1->contain(['table2', 'table3']); and table3 is not getting switched to that connection |
# |
Sep 7th 2019, 00:33 |
itmpls |
how can I guarantee that my tables that are being contained have my (new) connection set? |
# |
Sep 6th 2019, 20:28 |
alexdd55976 |
man, that was fun.. |
# |
Sep 6th 2019, 20:27 |
alexdd55976 |
i think that would add another 200k lines.. maybe even more |