# |
Jul 5th 2017, 10:54 |
neon1024 |
My tests pass :) |
# |
Jul 5th 2017, 10:54 |
neon1024 |
Right, thanks everyone. The logic in that link was sound thanks @savant, it also turns out that you’re spot on @chris-andre with getting the seconds as a float of hours by `$seconds / 60 / 60` |
# |
Jul 5th 2017, 10:22 |
neon1024 |
Your Google-Fu is strong! |
# |
Jul 5th 2017, 10:22 |
savant |
searched for “decimal time php” on google :slightly_smiling_face: |
# |
Jul 5th 2017, 10:21 |
neon1024 |
Perhaps it’s time for :coffee: |
# |
Jul 5th 2017, 10:21 |
neon1024 |
Hm, I’m sure I’ve looked at that already this morning. Thanks @savant. I’ll see if that code will satisfy my unit test |
# |
Jul 5th 2017, 10:21 |
savant |
? |
# |
Jul 5th 2017, 10:20 |
savant |
http://www.hashbangcode.com/blog/converting-and-decimal-time-php |
# |
Jul 5th 2017, 10:20 |
neon1024 |
I’m writing a little unit test right now to double check my thought process :slightly_smiling_face: |
# |
Jul 5th 2017, 10:20 |
neon1024 |
Unless the way I’ve been testing is incorrect |
# |
Jul 5th 2017, 10:20 |
neon1024 |
That’s what I thought, but it seems that it drops the remainder |
# |
Jul 5th 2017, 10:19 |
chris-andre |
@neon1024 Would that just be `$sec / 60 / 60` ? |
# |
Jul 5th 2017, 10:18 |
neon1024 |
Decimal time seems to be an actual type of time |
# |
Jul 5th 2017, 10:18 |
neon1024 |
As I’d like to plot on a graph in hours |
# |
Jul 5th 2017, 10:18 |
neon1024 |
I’m struggling to Google for this. Anyone know how I can convert 5400 seconds into 1.5 hours |
# |
Jul 5th 2017, 10:17 |
chris-andre |
Hi. Was reading about this https://github.com/cakephp/migrations/issues/252. Should schema-dump-default.lock be added to .gitignore? |
# |
Jul 5th 2017, 10:15 |
savant |
here is a cake3 integration for reference: https://github.com/josegonzalez/cakephp-queuesadilla |
# |
Jul 5th 2017, 10:15 |
savant |
https://github.com/josegonzalez/php-queuesadilla |
# |
Jul 5th 2017, 10:15 |
savant |
and create a worker for cake2 |
# |
Jul 5th 2017, 10:15 |
savant |
but you can use queuesadilla standalone |
# |
Jul 5th 2017, 10:15 |
savant |
as far as creating a queueing system for cakephp 2, I dont have a cakephp 2 specific worker |
# |
Jul 5th 2017, 10:14 |
savant |
switching to “middleware” wouldnt make it any faster |
# |
Jul 5th 2017, 10:13 |
savant |
somewhat similar to middlware |
# |
Jul 5th 2017, 10:13 |
savant |
@juststeveking in CakePHP 2.x you can use Dispatch Filters |
# |
Jul 5th 2017, 10:13 |
neon1024 |
:thumbsup_all: |
# |
Jul 5th 2017, 10:09 |
birdy247 |
then in the TimezoneAwareDateTime use that |
# |
Jul 5th 2017, 10:09 |
birdy247 |
This is what he said "the way to do it is to send the field from the form as an arary" |
# |
Jul 5th 2017, 10:08 |
birdy247 |
I spoke with @lorenzo last night regarding the datetime issue I was trying to solve |
# |
Jul 5th 2017, 10:08 |
birdy247 |
Hey neon1-24 |
# |
Jul 5th 2017, 09:58 |
neon1024 |
Perhaps you’d be better off with a third party monitoring service like something, New Relic? BlackfireIO ? |
# |
Jul 5th 2017, 09:56 |
dereuromark |
ok |
# |
Jul 5th 2017, 09:55 |
juststeveking |
So back to square one, unless events and listeners are async x) |
# |
Jul 5th 2017, 09:55 |
juststeveking |
It isn't 100% vital that it is ran straight away, however realistically storing the data fro the request in an audit table won't be much slower than storing it in a queue table really |
# |
Jul 5th 2017, 09:54 |
juststeveking |
Which is why I was thinking Event -> listen queue |
# |
Jul 5th 2017, 09:54 |
juststeveking |
it needs to be done, however a rebuild is in the pipeline |
# |
Jul 5th 2017, 09:54 |
juststeveking |
That is my problem |
# |
Jul 5th 2017, 09:54 |
neon1024 |
Ah Cake 2, that will limit your options :( |
# |
Jul 5th 2017, 09:54 |
neon1024 |
I log every request to our api using middleware |
# |
Jul 5th 2017, 09:54 |
juststeveking |
I couldn't find much on middleware with cakephp 2.x |
# |
Jul 5th 2017, 09:53 |
juststeveking |
but it seems to be slowing down the entire application |
# |
Jul 5th 2017, 09:53 |
neon1024 |
Perfect use-case for Middleware then |