Delayed Job ã¨ã¯ä½•ã‹ BackgrounDRb çš„ãªä½•ã‹ã§ã™ã€‚詳ã—ãã¯ã‚°ã‚°ã‚Œã°ã€è‹±èªžã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«çš„ãªã‚‚ã®ãŒã„ã‚ã„ã‚見ã¤ã‘られるã¨æ€ã„ã¾ã™ã€‚ コンストラクタã§è¤‡é›‘ãªã“ã¨ã‚’ã—ã¦ã„ã‚‹ã¨ã‚¨ãƒ©ãƒ¼ã«ãªã‚‹ class CrawlJob def initialize @agent = WWW::Mechanize.new end def perform ... end end ã‚’ lib/crawl_job.rb ã¨ã—ã¦ä¿å˜ã—ã€ã‚³ãƒ³ãƒˆãƒãƒ¼ãƒ©ãªã©ã‹ã‚‰ Delayed::Job.enqueue CrawlJob.new ã™ã‚‹ã¨ã€can't dump anonymous class Class (TypeError) ã¨ã„ã†ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ ç†ç”±ã¯ Delayed Job 内部㧠enqueue ã•ã‚ŒãŸã‚ªãƒ–ジェクト㮠YAML 化を行ã£ã¦ã„ã‚‹ã®ã§ã™ãŒã€ä¸Šã®ä¾‹ã® Mechanize オブジェク
{{#tags}}- {{label}}
{{/tags}}