How to properly use Gearman with my PHP application?
Posted
by luckytaxi
on Stack Overflow
See other posts from Stack Overflow
or by luckytaxi
Published on 2010-05-31T03:05:05Z
Indexed on
2010/05/31
3:12 UTC
Read the original article
Hit count: 347
For now I just want to use Gearman for background processing. For example, I need to email a recipient that they have a private message waiting for them once the sender submits their message into the DB. I assume I can run the worker/client and server on my primary server but I have no problems offloading some of the tasks to a different web server.
Anyways, my question is how do I handle multiple "functions?" Let's say I need a job that handles the email portion and a job to handle image manipulation. Can I have multiple functions in the worker? I've followed a couple of examples I found online but each example only shows one function being initialized. Do I have to start up multiple "workers" to handle multiple functions?
© Stack Overflow or respective owner