Log message #4047962

# At Username Text
# 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
# Jul 5th 2017, 09:53 juststeveking So every page request needs to be logged
# Jul 5th 2017, 09:53 juststeveking It is all part of an audit process
# Jul 5th 2017, 09:53 neon1024 Or even better, use a middleware if you need the request
# Jul 5th 2017, 09:53 juststeveking Thats my problem, my dispatch filter is being slow
# Jul 5th 2017, 09:52 neon1024 You could just add a new dispatch filter
# Jul 5th 2017, 09:52 neon1024 I don’t understand why you need an event and a listener just to add a message to a queue
# Jul 5th 2017, 09:52 juststeveking Or just add it to a queue table which is ran through by the worker
# Jul 5th 2017, 09:52 juststeveking @neon1024 I guess what I am after is an event that dispatches and a listener that will pass that data over to a queue worker?
# Jul 5th 2017, 09:51 neon1024 jarard01 Thanks, feel free to submit an issue if you find a bug :slightly_smiling_face:
# Jul 5th 2017, 09:51 neon1024 @juststeveking Sounds a good opportunity to add a message to a message queue and process it later
# Jul 5th 2017, 09:50 jarard01 no worries, nee dot run out but will take a look this afternoon, will let you know!
# Jul 5th 2017, 09:50 neon1024 jarard01, Sorry, I’m not sure what else to suggest. I guess you’ll need to debug from your post on the form, to the post data, and then into the plugins behaviour to track what happens to the data
# Jul 5th 2017, 09:45 juststeveking I have a dispatch filter running on before requests, which I'd rather trigger an event and not effect runtime
# Jul 5th 2017, 09:44 juststeveking In cake2 can I run events as a background process?
# Jul 5th 2017, 09:37 jarard01 changing that didn't help, I tired naming the field 'foo' but the outcome in the same
# Jul 5th 2017, 09:28 neon1024 Which would cause ‘image’ to be empty, as the uploaded file would be in ‘iamge’
# Jul 5th 2017, 09:27 neon1024 Seems like you might have a typo
# Jul 5th 2017, 09:27 neon1024 This is a red flag for me “type=“file” name=“image” id=“iamge”>”
# Jul 5th 2017, 09:07 jarard01 my form mark-up is as follows, https://gist.github.com/spacebiscuit/0024650d9e6366f8d66de4b1ebc3338b
# Jul 5th 2017, 08:58 jarard01 multipart/form-data with method post
# Jul 5th 2017, 08:56 neon1024 Also checking that the form is [‘type’ => ‘file’]