mirah / dubious

A Web Framework Written in Mirah for running on AppEngine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dubious keeps reloading after changing app.yaml

hakunin opened this issue · comments

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

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