Displaying 20 results from an estimated 28 matches for "load_rail".
Did you mean:
load_rails
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...
2006 Aug 25
0
Small Update: load_rails now actually loads rails
Folks-
After enough people running into problems because load_rails was
misleading and actually only loaded your models and ActiveRecord, I
have just pushed a small update> All that has changed is that in the
config file load_rails is set to true by default and it actually
loads all of rails by require''ing environment.rb. SO anything that
wor...
2006 Aug 07
2
uninitialized constants in worker class
.../Programme/ruby/lib/ruby/1.8/drb/drb.rb:1424:in `run''
C:/Programme/ruby/lib/ruby/1.8/drb/drb.rb:1344:in `initialize''
C:/Programme/ruby/lib/ruby/1.8/drb/drb.rb:1624:in `start_service''
script/backgroundrb/start:84
[2] background.yml
port: "22222"
timer_sleep: 60
load_rails: true
environment: development
host: localhost
database_yml: config/database.yml
acl:
deny: all
allow: localhost 127.0.0.1
order: deny,allow
2006 Sep 24
5
Can''t Connect to BackgroundRB
I''m having trouble getting backgroundrb up and running in a
production environment.
Here''s my backgroundrb.yml:
---
port: "22222"
timer_sleep: 60
load_rails: true
environment: production
host: XXX.XX.XXX.50
database_yml: config/database.yml
acl:
deny: all
allow: localhost 127.0.0.1 XXX.XX.XXX.51
order: deny,allow
I start BackgroundRB from XXX.XX.XXX.50 with script/backgroundrb/
start -d
I can then telnet localhost 22222 and connect to the d...
2007 Dec 30
3
A newbie question regarding BackgroundRb
...ad Ezra''s article on BackgroundRb and decided to use it one
of my projects. I installed the plugin into my rails project using
script/plugin and then ran rake backgroundrb:setup to copy the yml
scripts.
Now my backgroundrb.yml looks like
=======
---
port: "22222"
timer_sleep: 60
load_rails: true
environment: development
host: localhost
database_yml: config/database.yml
acl:
deny: all
allow: localhost 127.0.0.1
order: deny,allow
scheduled_task:
:class: :tx_reaper_worker
:worker_method: :do_work
:trigger_args:
:start: <%= Time.now %>
:repeat_interval: <%=...
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) }
+
2006 Dec 04
4
Question about acls
...gs down a lot. I would like to keep running rails on my main
server (server1) but move backgroundrb to a secondary server (server2).
I looked through the source trying to figure out how to do this and I
pieced together this configuration file:
--
:port: 22222
:timer_sleep: 60
:pool_size: 15
:load_rails: true
:rails_env: development
:environment: development
:host: localhost
:uri: druby://localhost:22222/
:database_yml: config/database.yml
:protocol: druby
:acl:
:deny: all
:allow: localhost 127.0.0.1 server1
:order: deny,allow
autostart:
1:
job_key: chat_notifier
class: chat...
2006 Jun 12
5
New release!
...w_worker :class => :foo_worker, :args => "Hello!"
The "Hello" argument gets sent to your do_work method.
# Put your code that runs your task inside the do_work method
# it will be run automatically in a thread. You have access to
# all of your rails models if you set load_rails to true in the
# config file. You also get @logger inside of this class by default.
class FooWorker < BackgrounDRb::Rails
def do_work(args)
# This method is called in it''s own new thread when you
# call new worker. args is set to :args.
@logger.debug Post.f...
2007 Oct 12
0
Trouble on Multi Server setup
...can''t get it to work:
http://rubyforge.org/pipermail/backgroundrb-devel/2006-December/000576.html
In my setup, server1 will be the report server, and server2 and
server3 are the application/web servers
The backgroundrb.yml looks like this on servers 2 and 3:
port: 22223
timer-sleep: 60
load_rails: true
rails_env: production
environment: production
host: 172.16.0.1
database_yml: config/database.yml
pool_size: 10
(172.16.0.1 is the local IP for server1)
On the report server (server1), I have this:
port: 22223
timer-sleep: 60
load_rails: true
rails_env: production
environment: production
h...
2007 Jun 21
0
config file questions
example:
:host: 192.168.1.101
:protocol: druby
:worker_dir: lib/workers
:rails_env: production
:pool_size: 15
:load_rails: true
:timer_sleep: 60
:acl:
:deny: all
:allow: localhost 192.168.1.*
:order: deny allow
I have this config file on 2 app servers running rails. The 2 servers are
running behind a load balancer. I''m starting the backgroundrb server on the
one server with the ip of 192.168.1.101....
2006 Aug 29
1
Tasks get executed twice with repeat_every
...notes. The current time is Mon Aug 28 19:19:03 MDT 2006
Sending due notes. The current time is Mon Aug 28 19:20:03 MDT 2006
Sending due notes. The current time is Mon Aug 28 19:20:03 MDT 2006
Is there any way to fix that? Here is my configuration file:
---
port: "22222"
timer_sleep: 60
load_rails: true
environment: development
host: localhost
database_yml: config/database.yml
acl:
deny: all
allow: localhost 127.0.0.1
order: deny,allow
autostart:
1:
job_key: due_note_queuer1
class: due_note_queuer_worker
Thanks,
Martin
2006 Jul 06
5
memory uses
Hi All,
I have this small doubt. Does backgroundrb have anything to do with
dispatch.fcgi?
some dispatch.fcgi are taking memory as much as 186 MB ....
this is monstrous man...
Also, if i put load rails environment with backgroundrb.yml file to be
false.What will happen? i just loses access to db through ActiveRecord
right?
I can still use normal mysql gem to access db and modify the
2006 Jul 07
4
Problems with ActiveRecord in workers
Hi *,
are there some special settings except of "load_rails: true" to make
ActiveRecord models accessible within my workers?
I''ve just installed the latest version of this great plugin, but I keep
getting
undefined method [] for #<DRb::DRbUnknown:0x12345> (line 105 in
backgroundrb.rb)
when one of the arguments for the worker is an A...
2007 Sep 24
3
Trouble using backgroundrb
...ssbar'' class="progress"></div>
<%= periodically_call_remote(:url => {:action => ''get_progress''}, :frequency => 1) %>
--------------------conf/backgroundrb.yml--------------------
---
:host: localhost
:port: 2000
:rails_env: development
:load_rails: true
:worker_dir: lib/workers
Your help is *very much* appreciated!
Thanks,
Ger Apeldoorn
2006 Sep 15
2
unable to figure out how to get backgroundrb.yml to be used when starting backgroundrb
i ran rake backgroundrb:setup and modified the default
config/backgroundrb.yml file as:
---
port: "22223"
timer_sleep: 60
load_rails: true
environment: production
host: localhost
database_yml: config/database.yml
acl:
deny: all
allow: localhost 127.0.0.1
order: deny,allow
and my database.yml
production:
adapter: mysql
database: chip2_production
username: xxxxx
password: xxxxx
socket: /var/lib/mysql/mysql.sock...
2006 Nov 27
1
rails environment loaded but one plugin is undefined (using backgroundrb 0.2.0)
Hello all,
I''m using BackgroundRb 0.2.0 (standalone) and in the do_work method of
my worker, I''m working with objects from my Rails application. So in my
config/backgroundrb.yml file, I added this line:
:load_rails: true
I think my worker isn''t doing what I want him to do. So I opened the
console and read these error lines:
# ruby script/backgroundrb console
irb: warn: can''t alias jobs from irb_jobs.
irb(#<BackgrounDRb::MiddleMan:0xb75b06dc>):001:0> Thumbnail
=>...
2007 Aug 08
3
Cannot start workers in production mode
...script/backgroundrb:29
I am at a loss to explain what is going on here. BackgrounDRb::VERSION
reports I run version 0.2.1 of backgroundrb. I have version 1.2.1 of slave,
and version 1.0.6 of daemons installed. My backgroundrb.yml file is the
following:
---
port: "22222"
timer_sleep: 60
load_rails: true
environment: production
host: 127.0.0.1
database_yml: config/database.yml
acl:
deny: all
allow: localhost 127.0.0.1
order: deny,allow
Hopefully someone can help me get through this, because I am in the middle
of deploying our first app, and it would suck to be delayed any more.
Than...
2006 Aug 25
3
uninitialised constant LoginEngine
In my worker class, when i try to start the worker thread, it throws the
error:
uninitialized constant LoginEngine - (NameError)
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in
`const_missing''
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in
`const_missing''
2006 Jul 19
3
BackgrounDRb not working properly with files ?
...m facing a big problem which I
can''t seem to wrap my head around.
The short version of it is : code that works when tested inside RoR''s
console doesn''t work when executed by a BackgrounDRb worker.
So I''ve tried a lot of things, including checking that the
"load_rails" was true in the config, and I''m starting to wonder if
this is not some kind of problem between BackgrounDRb and files or
BackgrounDRb and file_column (which I''m using here).
Any idea or help is greatly appreciated.
My models are basically :
- Clip has_many records
- Reco...
2007 Feb 28
0
example for standalone?
...dalone mode .... I''m kinda having some trouble
integrating this into my application.
1) if backgroundrb is in ~/project_managment_app/lib/backgroundrb ... where
do /config and /worker dirs go ...trying rake backgroundrb:setup blew
chunks
2) I assume my config.yml should have false for :load_rails and not set an
:enviroment value ?
thanks for any help in this regard.
-davidg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20070227/b656d3fb/attachment-0001.html