Displaying 20 results from an estimated 80000 matches similar to: "System Calls"
2008 Apr 12
6
Cutting down BackgrounDRb memory issue
Hi Folks,
I have been working to fix BackgrounDRb memory usage as such. Ruby1.8 GC
isn''t fork friendly and it seems to use a lot of memory because when you
fork, it sets a bit in all the objects in global scope which causes OS
to all pages in child process.
A classic solution is to use fork and exec, rather than just fork. Its
working and pretty stable, but you loose ability to pass
2006 Aug 08
2
"include DRbUndumped" error
Hi,
I am getting my hands on trying the cool BackgrounDrb plugin.
Following various discussions and suggestsion, I included "include DRbUndumped"
in my ActiveRecord model. However, the following exception occurs
after I tried this and hit the page that uses this model. Does anyone
know why this is so? Is it possible that an object cannot be
DRbUndumped (that would mean, we
2006 Jun 16
7
How to pass params to long running system call
Hello,
Can someone tell me the best way to make a system call (from within my
model) that runs for a while and requires params form my model,
specifically attributes of my model.
So, I need the correct syntax and also general guidelines for launching
the process.
Thanks so much.
Regards,
Doug
--
Posted via http://www.ruby-forum.com/.
2007 Mar 08
1
cant fully capture child output
I cant seem to get the io from a child process of a worker back to my
client. There most be something academic I''m missing :/. I looked at
examples in Pickaxe and Ruby PLEAC library ... and I believe the following
should work:
# called from within do_work...
def backup(repo)
logger.info(''SvnWorker backup repo ''+repo)
tmp = []
my_project =
2007 Nov 21
2
Is fork { } safe inside of a worker? How else may this be done...
I have a BackgrounDRb worker running every 2 minutes. Here''s the basic idea:
- events = Event.find_all_pending( 2.minutes )
- while( all events have yet to be processed )
---- if( Time.now <= event.time_to_process )
------- fork { process_event }
--- end
--- sleep( 0.25 )
- end
- puts "Done..."
Events that need to be processed within the next 2 minutes are loaded and
2008 Apr 14
6
Good news: BackgrounDRb now works on Windows
Hello all,
I have some good news to announce. I have made some changes to a local copy
of BackgrounDRb 1.0.3 (actually most of the changes were in Packet 0.1.5)
and I''ve got it working on Windows. From what I''ve read, this is the first
time it''s worked on Windows in a year and a half, since 0.2 was released.
In my research I can see that a number of people have asked
2006 Sep 14
1
Status of your worker pool
On Sep 14, 2006, at 10:25 AM, Michael Siebert wrote:
> Hey Ezra,
> how is the status of your worker pool? i need some thing like this
> ASAP and i can''t get David Lemstra''s QueueWorker to work, so: whats
> the status? do you have some "beta" lying around on your hard
> drive? I dont want to spend my time on that if you''re coming up
>
2008 Jan 14
3
problem with backgroundrb
hi, i am using drb and it is working fine on my local pc on windows..
and after uploading the code to the server it was working for
sometime but now it gives me error every time i invoke the process..
error---
uninitialized constant EmailWorker::Notifier - (NameError)
/usr/lib64/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:477:in `const_missing''
2006 Aug 06
3
Bug or feature: WEBrick threading (vs script/console thread)
I don''t know whether this is a bug or feature, and I don''t know whether
this belongs to Gmailer (http://rubyforge.org/projects/gmailutils) in
specific or Rails/Ruby in general.
I have an instance method in an ActiveRecord model, that upon a web
request using WEBrick, spawns off a thread, in which it invokes Gmailer
to perform some processing. What fails is that simply
2006 Dec 14
5
Is there a way to make backgroundrb 0.2.1 fail silently on win32?
After upgrading to backgroundrb 0.2.x, Rails barfs lstat errors left and
right when using the console or webrick or mongrel on win32. We run our
site on a Linux server, so I''m not trying to get backgroundrb to work on a
win32 machine. I just want to quietly stop loading itself if it detects
that it''s on a win32 machine so that the rest of Rails can continue to load.
Most of
2008 Sep 27
3
make a system call and proceed without waiting for result?
This is probably a general ruby question: in one of my models i need to
make loads (up to 600 or so) of system calls with the curl command.
It''s a fire-and-forget kind of deal - i don''t care, at that particular
moment, whether the calls were successful or not and i certainly don''t
want to keep the user waiting for the html responses to come back.
Is it possible, with a
2006 Apr 21
1
Enabling ruby -r by hacking out Webrick''s fork
Has anyone tried hacking the fork out of Webrick''s servlet dispatch code
so that ruby -r can be used to debug rails apps?
--
Posted via http://www.ruby-forum.com/.
2007 Jan 12
2
Forking a process in Rails is messing up mongrel
I''m trying to run an external Ruby script from my Rails app.
To do this i''m using this function
def fork_with_new_connection(config, my_class = ActiveRecord::Base)
pid = fork do
begin
my_class.establish_connection(config)
yield
ensure
my_class.remove_connection
end
end
Process.detach(pid)
end
Then, within my controller I do this:
2008 Mar 18
1
regarding problem backgroundrb setup(new to ruby on rails)
Hi all
My problem is that:
With reference to
http://backgroundrb.rubyforge.org/
1---I have download backgroundrb from
http://opensvn.csie.org/ezra/rails/backgroundrb
to my vendor/plugin in my application folder.
2-- after that I used the command to run :-rake backgroundrb:setup --
trace
From my application
2007 Apr 07
4
Error when starting Backgroundrb
Hi Folks,
I want to set up backgroundrb on my laptop to do some tests. But when I
run "scripts/background start" I get this error:
ruby/lib/ruby/gems/1.8/gems/daemons-1.0.5/lib/daemons/daemonize.rb:160:in
`setsid'': the setsid() function is unimplemented on this machine
(NotImplementedError)
from
ruby/lib/ruby/gems/1.8/gems/daemons-1.0.5/lib/daemons/daemonize.rb:160:in
2008 Jan 17
1
Windows
Any plans to get version 1.0 working on Windows? I am getting :
script/backgroundrb:24:in `fork'': fork() function is unimplemented on
this machine (NotImplementedError) from script/backgroundrb:24
--
Aloha,
Kevin English
Honolulu, HI
808.271.5125
kenglish at gmail.com
www.kenglish77.com
2006 Jul 31
1
How do I call a controller from a model, console, or outside of rails?
Hi,
I''m writing yet another cms and I need to capture the html output of a
rendered template including helpers, etc from within my rails app. I
plan to use backgroundrb, and I need to be able to capture the output of
"pages.browse()" where pages is my controller. I need to pass in the id
param.
How can I do this besides using Net::HTTP? Using Net::HTTP hangs when
2006 Jul 26
4
BackgrounDRb - uninitialized constant
I installed BackgrounDRB as instructed:
script/plugin install svn://rubyforge.org//var/svn/backgroundrb
rake backgroundrb:setup
I started it with:
rake backgroundrb:start
In a model I make the call:
MiddleMan.new_worker :class => :rss_worker
In /lib/workers I have file rss_worker.rb, which contains the class:
Class RssWorker < BackgrounDRb::Rails
def do_work(args)
...
end
end
2007 May 30
7
Ticket 616, service resource takes over puppetd port
Hello Luke,
After our services do now successfully restart, we hit now the already
opened bug where the restarted service takes over puppetd port if it''s
configured to listen.
One solution is to remove the listen option but it''s very nice to invoke a
puppetrun on the clients from the central server without waiting for its
next run.
Where you already able to take a look? It
2007 Feb 22
33
Scaling Puppet 0.22.1 to hunderdes of nodes.
Hi,
My environment is composed of ~250 workstations hitting a single
puppetmaster server, which has been working fairly well up until now.
The most recent change has been a migration of a lot of remote file copy
objects which were previously handled with cfengine.
client side puppetd calls to the puppetmaster.getconfig method are
taking unreasonably long, on the order of 2-3 minutes. It