I'm trying to get backgroundrb set up and working but i have a problem getting it to listen to our server. It works for me locally, with these settings -
I fixed this, it was a dumb error on my part to do with how i was testing it. In the process i worked out how to write to a custom log file from backgroundrb (this showed me what i was doing wrong).
Great work Max. Do you want to share with us what you did to create a custom log and actual troubleshooting process? Thanks. Bharat
Bharat Ruparel wrote:
Great work Max. Do you want to share with us what you did to create a custom log and actual troubleshooting process? Thanks. Bharat
Yeah - in the worker class:
class LmailWorker < BackgrounDRb::MetaWorker set_worker_name :lmail_worker @@logger = Logger.new("log/backgroundrb_custom.log")
def ldb(debug_text) @@logger.info "### #{caller[0]}: #{debug_text}" end
def create(args = nil) # this method is called, when worker is loaded for the first time ldb "created LmailWorker" end end
Example logger output -