You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to DeRailed - Denver Rails UG
Hello, what i ve been trying to achieve is pinging all ipaddress
present in my database periodically.
So i tried using spawn(:method=>thread) since im on windows.
its working fine but its working well with scheduling.
my code is like this:
def index
spawn(:method=>:thread) do
scheduler = Scheduler.new
scheduler.start
scheduler.schedule_every('1s') {ping_ip_addr}
scheduler.join
end
end
and if i try using sleep with spawn then it pings only first ip
address presnet in database.
please help!!
thanking in advance!!
Tom Anderson
unread,
May 16, 2008, 3:23:39 PM5/16/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to dera...@googlegroups.com
I'm not familiar with the Scheduler stuff you're using but I suspect your problem is with that. Put some debug around that and I would guess you'll see it exiting the spawn block immediately which may not be what you want.