Hi Tomasz,
On 7/19/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> > Very interesting.
> >
> > I will try to reproduce that with a tiny Rails application (with a
> > "puts 'nada'" instead of "NotifMailer...").
> >
> > Meanwhile if you get more info, please post it here.
> >
>
> I've tried it with puts "sometext" of course, the flaw in mailer
> object is the first thing I suspected. But it's OK. Should've posted
> this one with a puts block, my bad.
>
> Another funny thing: if the block Proc object is still there, I've
> decided to kick it manually from mentioned "ping" action (which is
> responsible for checking pending actions and printing/emailing info
> about them - it's still a test app). So, an attempt to do:
> $scheduler.get_job(id).block.call
> results in
> ArgumentError (A copy of AuctionController has been removed from the
> module tree but is still active!):
> /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
> dependencies.rb:237:in `load_missing_constant'
> /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
> dependencies.rb:468:in `const_missing'
> .//app/controllers/auction_controller.rb:22:in `start'
> .//app/controllers/auction_controller.rb:50:in `call'
> .//app/controllers/auction_controller.rb:50:in `ping'
Very interesting, it seems that your Rails does nifty things.
I have tested the concept :
My Rails :
---8<---
sonanda:~ mettraux$ gem list rails
*** LOCAL GEMS ***
rails (1.2.2)
Web-application framework with template engine, control-flow layer,
and ORM.
--->8---
My controller :
---8<---
class TestController < ApplicationController
def index
puts "__scheduling..."
$scheduler.schedule_in "10s" do
puts "____________________ here !"
end
end
end
--->8---
And it just works as expected :
---8<---
__scheduling...
Processing TestController#index (for 127.0.0.1 at 2007-07-19 22:38:58) [GET]
Session ID: 99c67832a629fa5c802fd79eb91fe231
Parameters: {"action"=>"index", "controller"=>"test"}
Rendering test/index
Completed in 0.00141 (709 reqs/sec) | Rendering: 0.00038 (27%) | 200
OK [http://localhost/test]
____________________ here !
--->8---
I'm using the default Mongrel, just using default stuff.
Have you some special configuration for your Rails application ?
--
John Mettraux -///- http://jmettraux.openwfe.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"OpenWFEru users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/openwferu-users?hl=en
-~----------~----~----~----~------~----~------~--~---