mirah / dubious

A Web Framework Written in Mirah for running on AppEngine
Apache License 2.0
121 stars 13 forks source link

dubious keeps reloading after changing app.yaml #28

Open hakunin opened 13 years ago

hakunin commented 13 years ago

How to reproduce:

1) run rake 2) make change to app.yaml 3) observe reloading in commandline

This happens using D003 and M007 tested with appengine 1.4.2 and appengine 1.4.0

hakunin commented 13 years ago

I think I may have found the bug:

dubious_tasks.rb, line 94:

def update
  begin
    timestamp = app_yaml_timestamp
    @last_app_yaml_timestamp ||= timestamp

    needed_prerequisites = real_prerequisites.select {|r|r.needed?}

    needed_prerequisites.each {|dep| dep.execute }
    unless needed_prerequisites.empty? && timestamp == @last_app_yaml_timestamp
      begin
        open('http://localhost:8080/_ah/reloadwebapp')
        @last_app_yaml_timestamp = timestamp #shouldn't it be app_yaml_timestamp instead?
      rescue OpenURI::HTTPError
      end
    end
  rescue Exception
    puts $!, $@
  end
end