Sure, There are couple of ways:
1. worker_name method will be available inside your worker code and should be non nil. 2. If inside worker code, you will have access to many worker unique attributes (like thread_pool), you can check for those and make conditions. On Sat, 2008-09-13 at 16:10 -0400, [EMAIL PROTECTED] wrote: > > Hello Hemant et al - > > I have a module which is common to my foreground Rails code > and some of my workers. Is there a way to determine whether I am > running in a worker? I can't use the session because not all my > foreground code has a session; some is run as callbacks to the > foreground and has no session. There may have been a question about > this in the past, but, if so, I haven't found it. Any suggestions are > appreciated. > > Regards, alan > _______________________________________________ > Backgroundrb-devel mailing list > [email protected] > http://rubyforge.org/mailman/listinfo/backgroundrb-devel _______________________________________________ Backgroundrb-devel mailing list [email protected] http://rubyforge.org/mailman/listinfo/backgroundrb-devel
