Permalink
Browse files

Make data_set non-side-effect-y unless you call one of its functions,…

… and adjust load_data.{sh,bat} accordingly
  • Loading branch information...
1 parent fd92533 commit 0402c227a9f08048561659fdfc90696509b40ad9 @amalloy amalloy committed May 19, 2011
Showing with 2 additions and 7 deletions.
  1. +1 −1 load-data.bat
  2. +1 −1 load-data.sh
  3. +0 −5 src/foreclojure/data_set.clj
View
@@ -1,3 +1,3 @@
@echo off
for /f %%a in ('lein classpath') do @set project_classpath=%%a
-java -cp %project_classpath% clojure.main .\src\foreclojure\data_set.clj
+java -cp %project_classpath% clojure.main -i .\src\foreclojure\mongo.clj -e "(use 'foreclojure.mongo) (prepare-mongo) (shutdown-agents)"
View
@@ -1,3 +1,3 @@
project_classpath=`lein classpath`
echo $project_classpath
-java -cp $project_classpath clojure.main ./src/foreclojure/data_set.clj
+java -cp $project_classpath clojure.main -i ./src/foreclojure/mongo.clj -e "(use 'foreclojure.mongo) (prepare-mongo) (shutdown-agents)"
@@ -3,12 +3,9 @@
(defn load-problems []
(do
- (mongo! :db :mydb)
-
(insert! :seqs
{:_id "problems"
:seq 87})
-
(insert! :problems
{:_id 1
:title "Nothing but the Truth"
@@ -1014,5 +1011,3 @@ number of prime numbers."
"(= (__ 1 2 10 100 1300) '(= (* (+ 1 2 10) 100) 1300)"]})
))
-
-(load-problems)

0 comments on commit 0402c22

Please sign in to comment.