Permalink
Browse files

moving create_graph to a rake task

  • Loading branch information...
1 parent d8a7ff0 commit 0ddc3b2a629da2031c71fe7796a135f7557dee35 @maxdemarzi committed Jan 18, 2012
Showing with 8 additions and 5 deletions.
  1. +8 −0 Rakefile
  2. +0 −5 neoflix.rb
View
@@ -1 +1,9 @@
require 'neography/tasks'
+require './neoflix.rb'
+
+namespace :neo4j do
+ task :create do
+ neo = Neography::Rest.new(ENV['NEO4J_URL'] || "http://localhost:7474")
+ create_graph(neo)
+ end
+end
View
@@ -142,11 +142,6 @@ def get_recommendations(neo, node_id)
}.to_json
end
- get '/create_graph' do
- neo.execute_script("g.clear();")
- create_graph(neo)
- end
-
get '/' do
@neoid = params["movies"]
haml :index

0 comments on commit 0ddc3b2

Please sign in to comment.