追è¨: å ã®ã½ã¼ã¹ãæç´ã«æ¸ãåããã ããªã®ã§Rubyã£ã½ããªãã§ãã ã¡ããã¨ããã®ãciããããããªã®ã§ç¨æ¸ã¿ã§ãï¼ http://code.sixapart.com/svn/gearman/trunk/api/ruby/lib/ http://dan-erat.livejournal.com/83941.html ---- http://la.ma.la/misc/ruby/gearman/util.rb http://la.ma.la/misc/ruby/gearman/worker.rb Rubyã§Gearmanã®Workerãæ¸ãã¦ã require 'gearman/worker' worker = Gearman::Worker.new worker.debug = 1 worker.job_servers("127.0.0.1") worker.register_func
daemonã®èµ·å ä¸è¨ã®ããã«daemonã¨ãã¦èµ·åãã¾ãã daemonèµ·åãªãã·ã§ã³ã«é¢ãã¦ã§ãããPODã®è¨è¼ã¯èª¤ãã§--daemonizeã§ã¯ç¡ã--daemonã§ãã $ sudo gearmand --daemon --pidfile=/var/log/gearmand.pid --debug=1 é¢æ°ã®ç»é² 次ã«gearmanã«å®è¡ããããå¦çãäºãç»é²ããããã«job queãå¾ ã¡åããworkerãè¨è¿°ãã¾ãã #!/usr/bin/perl use strict; use warnings; use Data::Dump qw(dump); use Gearman::Worker; use Storable qw(thaw); use List::Util qw(sum); my $worker = Gearman::Worker->new; $worker->job
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}