similar to: render rhtml templates in worker

Displaying 20 results from an estimated 10000 matches similar to: "render rhtml templates in worker"

2007 Feb 04
2
Can BackgrounDrb help me?
I have a big report to produce from a Rails app that takes several minutes to put together. I hoped backgroundrb would be able to pull together all the ActiveRecord stuff in the background then throw it back to Rails for rendering. It seems, however, that I can''t pass an array of ActiveRecord objects from the worker back to Rails. Do I have that right? Another possibility was to do
2006 Jun 15
5
Cannot invoke ActiveRecord subclass accessors in DRb worker
Hi there, I''m trying to create a worker to do some asynchronous web client work and update the data model with its results. It seems, however, that every call I make to an ActiveRecord subclass causes the whole thing to block. At least I think it''s blocked. Right now I''m just using debug log output. Is there a decent way to debug/test workers I can try? Is there any
2007 Aug 23
2
Render partial from Backgroundrb worker?
Hi, I have a long running task which generates JavaScript to files and I am hoping to move this to a backgroundrb worker. The javascript is currently generated with call to render_to_string: File.open(File.join(target_folder, ''all.js''), "w") do |file| file.puts(render_to_string :partial => ''partials/shared/javascript/tags'', :locals => {
2007 Jan 19
6
Stopping DRb after using BackgrounDRb::MiddleManDRbObject.init
Hi, I''m having a problem where connections started through BackgrounDRb::MiddleManDRbObject.init are not stopped, resulting in an ever growing established connections between my Mongrels and remote backgroundrbs I added DRb.stop_service to my code executed after requests that init MiddleManDRbObjects but that does not help. Any ideas? Thanks, Robert Bjarnason
2006 Jul 14
4
Using BackgrounDRb to replace nested loops?
In response to my Rails Weenie post today[1], someone mentioned that I try BackgrounDRb to help take the strain off my application. 1: http://rails.techno-weenie.net/question/2006/7/13/nested-loops- best-way-to-send-messages-to-blog-subscribers I''ve just tried to install and use BackgrounDRb with my app, but I''m afraid that I''m not too versed in running processes
2007 Jan 15
6
Instantiating middleman and worker from inside a model?
In short: how (if possible) would i go about arranging it so that i can instantiate a middleman and set a worker going from within a method in one of my models? or is this a weird thing to be wanting to do? ( My specific situation: I have an ''Image'' model in my application. An actual image file associated with the model is being stored on amazons s3 system.
2008 May 04
3
Rails Configuration in Workers
I override some Rails'' configuration options in my project, like: config.database_configuration_file = "#{RAILS_ROOT}/local/config/ database.yml" But they aren''t picked up in BackgroundRB because Rails ActiveRecord is just initialized directly in MasterWorker#load_rails_env: db_config_file = YAML.load(ERB.new(IO.read("#{RAILS_HOME}/
2007 Feb 02
7
logging problem in production
Greetings all; I''ve just moved my app into production and BackgrounDRb is writing to development.log. The backgroundrb.yml file specifies production, as does environment.rb. A little background (no pun intended ;-0 ) I''m using the ''old'' version of backgroundrb for session management. In the app, whenever a visitor changes pages I record the time in a db
2007 Dec 18
9
Long-running pages cause mongrel time-outs
Hi all, We use mongrel behind apache (using mod_proxy_balancer) to run an internal app for our business. Lately we''ve been seeing frequent errors from some of our mongrel processes. [Sun Dec 16 08:48:47 2007] [error] [client <CLIENT1>] (70007)The timeout specified has expired: proxy: error reading status line from remote server 127.0.0.1, referer:
2011 Nov 29
2
template does not print variables
Hello list, I am having a problem with template file. Why are variables not interpolated? [root@puppet manifests]# cat /etc/motd memory free = <%= memoryfree %> domain = <%= domain %> operating system = <%= operatingsystem %> This is the template file [root@puppet manifests]# cat ../templates/motd.erb memory free = <%= memoryfree %> domain = <% domain %>
2006 Nov 21
1
rendering from within a worker
I''m using backgroundrb for its scheduled jobs. Now, a job that runs on a daily basis creates an xml file that I currently create with an .rxml template. Can I run a controller action from within a worker ? Can I render() a template from within a worker ? Sorry, I haven''t grasped the whole rails/backgroundrb relationship so I don''t know what I can and not do. Thanks
2007 Jan 29
1
rails_env configuration conflict...
I''ve found a conflict in the way the configuration file is handled, in particular effecting the setting of the ENV[''RAILS_ENV''] value. When I attempted to run a worker in production, it would run fine the first time - the second time would fail because it was trying to access the development database. I had created a ''backgroundrb_prodcution.yml'' file
2006 Sep 26
0
Is it possible to render RXML partials in RHTML templates?
I have a RHTML template and I would like the output of a RXML partial to be embedded within it. When I do <%= render(:partial => ''list_edit'') %> where there exists a _list_edit.rmxl file, I get XML parsing errors in the browser - I believe because the partial is causing the rendered content to be identified as XML instead of HTML. Is there any way to
2008 Jun 09
2
cruisecontrol integration
Hi everyone. Backgroundrb is doing some really sweet stuff for my project. Thanks! I am trying to integrate backgroundrb with cruisecontrol.rb. I started off by creating a simple Rakefile::::: desc ''task for starting up backgroundrb'' task :cruise do template = <<-EOF :backgroundrb: :ip: 0.0.0.0 :port: 11006 :development: :backgroundrb: :log: foreground
2007 Dec 13
4
Some fixes and updates
Hi , If you are following commits, I have pushed following changes: 1. Now, you can specify :environment option in config file to load production environment and stuff. 2. Exeptions that were exposed to the user has been changed to BdrbConnError if rails is not able to connect to bdrb server. 3. loading mechanism has been changed, so remove backgroundrb script from your backgroundrb directory
2007 Jan 30
1
Backgroundrb weirdness with multiple mongrels
Hi list, I''m having some issues getting backgroundrb to play nice with more than one mongrel. When I run my app on a single mongrel instance it works fine. I have two different problems show up in my backgrounrb_server.log. The top of the backtrace is shown here: 20070130-12:03:03 (92473) failed to find slave socket - (RuntimeError) 20070130-12:03:03 (92473)
2006 Aug 07
1
:load_rails
if CONFIG[''load_rails''] ActiveRecord::Base.allow_concurrency = true ActiveRecord::Base.establish_connection(YAML.load(ERB.new(IO.read ("#{RAILS_ROOT}/#{CONFIG[''database_yml'']}")).result)[CONFIG[''environment'']]) end if i read the code right, this option doesnt really load rails. wouldnt it be better (for those who rely on the
2007 Apr 26
2
looking for a worker that''s gone
In my app, I store the job key when a worker is fired off and then check back in periodically to see how its doing. The workers delete themselves when they''re done. I would expect when I try to get a worker that has been deleted, I would get nil or a proper exception, but instead I get: >> MiddleMan.worker(''foobar'') NoMethodError: undefined method
2006 Nov 08
3
0.2.0 worker/slave creation
We ran into some problems accessing a freshly created worker, and had to insert a sleep of 1 second to get it to work. It looks like Ezra and skaar already know this: from middleman.rb: # HACK: there is a race in the worker/slave creation, we # currently need to sleep between create. sleep 0.1 You might want to increase it to 1 second for those of us on slowly mac books.
2006 Jun 21
4
one more suggestion for backgroundrb
this: Index: script/backgroundrb/lib/backgroundrb.rb =================================================================== --- script/backgroundrb/lib/backgroundrb.rb (revision 16) +++ script/backgroundrb/lib/backgroundrb.rb (working copy) @@ -29,7 +29,11 @@ # the log via @logger def initialize(args) @logger = BACKGROUNDRB_LOGGER - Thread.new { do_work(args) } +