diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-10-16 11:37:31 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-10-16 11:37:31 -0400 |
commit | 411b4d279ee726c141b44a8cf75a7bb2e602be03 (patch) | |
tree | 414f0cb976509a46cd2a663579c3afbdcfe10040 | |
parent | f634e700936bf0a26ee1492209e1fdb2811cfa00 (diff) | |
download | mongo-411b4d279ee726c141b44a8cf75a7bb2e602be03.tar.gz |
only put a timeout on db.eval if --quota is on
-rw-r--r-- | db/dbeval.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/db/dbeval.cpp b/db/dbeval.cpp index d4832d55e10..b20385035ac 100644 --- a/db/dbeval.cpp +++ b/db/dbeval.cpp @@ -29,6 +29,7 @@ #include "json.h" #include "repl.h" #include "commands.h" +#include "cmdline.h" #include "../scripting/engine.h" @@ -85,7 +86,7 @@ namespace mongo { int res; { Timer t; - res = s->invoke(f,args, 10 * 60 * 1000); + res = s->invoke(f,args, cmdLine.quota ? 10 * 60 * 1000 : 0 ); int m = t.millis(); if ( m > 100 ) { out() << "dbeval slow, time: " << dec << m << "ms " << ns << endl; |