Difference between revisions of "Setting up Gearman"
From Dreamwidth Notes
(Trivia) |
(thanks deborahGU and xb95) |
||
Line 20: | Line 20: | ||
@GEARMAN_SERVERS = ('localhost:7003'); | @GEARMAN_SERVERS = ('localhost:7003'); | ||
+ | When looking for examples of gearman workers in existing code, try: | ||
+ | egrep -i gearman bin/worker/* | ||
[[Category: Dreamwidth Installation]] | [[Category: Dreamwidth Installation]] |
Revision as of 02:43, 12 May 2013
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/*