Pushing closure to queue takes up part of the 64kb of message size?
Most of the time for my email tasks, I find myself passing a closure to Mail::queue.
However I do wonder, other than the $data array, does the function I passed to Mail::queue get delivered to IronMQ and hence take up part of the 64kb message size limit of the free plan? Asking this as I'm afraid it might take up too much kb and hence my users (teachers) are not able to type longer content to send out to all recipients (students). Given how the content area has html in it as well (content produced by WYSIWYG editors).
If that becomes an issue, you could instead save that content to the DB (or cache, etc), and have your queued closure retrieve that record from the DB, and send it.
Can you run Redis? I've been extremely pleased with using Redis for queues for around a year now. It's completely free and not hard at all to configure for a simple Laravel app. I've even got it running on Windows 8 .
@willvincent so that means the function I provided to Mail::queue is part of what will be sent to IronMQ?
I'm not exactly sure how my queued closure can pass data to the view I'm using though since Mail::queue has 3 component. 1. The view used, 2. the data array, 3. the function closure. The data array is what is passed to the view used to render the email and my announcement content will be in the data array not the queue closure. unless there is a way to pass variables to the view from my closure.
I'm not working alone but with a few school mates for a school project. Getting things setup and installed on their computers is usually a huge hassle that I would rather not to as while they are very good friends of mine, they aren't interested in development (so getting them to do it on their own is perhaps impossible). What are the pros of using Redis as queue compared to other options?
@polarcubs First off -- Redis is an open source, in-memory key-value cache (like MemCached). It's extremely fast.. all requests are near instant.
Redis is used in a few of Laravel's services... Queue, Cache, and Session. One could say Database too but it'd be tough to use only that. I could be forgetting one too haha.
I'm running ~130 sites on one Laravel 4 installation, and each of the have 250k+ pages :) and the all the pages are persistently stored in Redis, i.e. I can restart my server and only lose a few minutes of cache.
My side topic aside... If you guys aren't too into developing or you're in it mostly doing this for the grade, go with whatever is easiest, man.