Setting up Gearman
From Dreamwidth Notes
Revision as of 02:43, 12 May 2013 by AzureLunaticDW (Talk | contribs)
About
An asynchronous job scheduling engine, of the type "do this somewhere else". Benefits: somewhere else, fast. Flaws: currently if it dies jobs are lost (apparently the team that manages it is working on that). Name is an anagram of "manager"; from LiveJournal days. IRC log with history/discussion Gearman on Dreamwidth gearman.org
Setup
Install the server:
sudo apt-get install gearman-server
And also edit /etc/default/gearman-server so that ENABLED is true.
Run the daemon:
sudo /etc/init.d/gearman-server start
Might want to add it to startup.
Then, you need to add this to your configs in the LJ section somewhere:
@GEARMAN_SERVERS = ('localhost:7003');
When looking for examples of gearman workers in existing code, try:
egrep -i gearman bin/worker/*