Sha256: fa8a7d74643177b4cdef41ccd63a0c48b2743307e0aaa0ddfb2ed6775087da91

Contents?: true

Size: 477 Bytes

Versions: 80

Compression:

Stored size: 477 Bytes

Contents

module Neo4j
  module Migrations
    class CheckPending
      def initialize(app)
        @app = app
        @last_check = 0
      end

      def call(env)
        latest_migration = Neo4j::Migrations::Runner.latest_migration
        mtime = latest_migration ? latest_migration.version.to_i : 0
        if @last_check < mtime
          Neo4j::Migrations.check_for_pending_migrations!
          @last_check = mtime
        end
        @app.call(env)
      end
    end
  end
end

Version data entries

80 entries across 80 versions & 2 rubygems

Version Path
neo4j-9.6.2 lib/neo4j/migrations/check_pending.rb
activegraph-10.0.0.pre.alpha.11 lib/neo4j/migrations/check_pending.rb
activegraph-10.0.0.pre.alpha.10 lib/neo4j/migrations/check_pending.rb
activegraph-10.0.0.pre.alpha.9 lib/neo4j/migrations/check_pending.rb
activegraph-10.0.0.pre.alpha.8 lib/neo4j/migrations/check_pending.rb
activegraph-10.0.0.pre.alpha.7 lib/neo4j/migrations/check_pending.rb
activegraph-10.0.0.pre.alpha.6 lib/neo4j/migrations/check_pending.rb
neo4j-10.0.0.pre.alpha.5 lib/neo4j/migrations/check_pending.rb
neo4j-10.0.0.pre.alpha.4 lib/neo4j/migrations/check_pending.rb
neo4j-10.0.0.pre.alpha.3 lib/neo4j/migrations/check_pending.rb
neo4j-10.0.0.pre.alpha.2 lib/neo4j/migrations/check_pending.rb
neo4j-10.0.0.pre.alpha.1 lib/neo4j/migrations/check_pending.rb
neo4j-9.6.1 lib/neo4j/migrations/check_pending.rb
neo4j-9.6.0 lib/neo4j/migrations/check_pending.rb
neo4j-9.5.3 lib/neo4j/migrations/check_pending.rb
neo4j-9.5.2 lib/neo4j/migrations/check_pending.rb
neo4j-9.5.0 lib/neo4j/migrations/check_pending.rb
neo4j-9.4.0 lib/neo4j/migrations/check_pending.rb
neo4j-9.3.0 lib/neo4j/migrations/check_pending.rb
neo4j-9.2.4 lib/neo4j/migrations/check_pending.rb