Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ruby iteration
Started POST "/reports/distributor" for 127.0.0.1 at 2013-03-19 15:02:16 +0530
Processing by ReportsController#distributor as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"0auleqI26KHq7LL373WpzslaGJWy45LMhnPeEpWedoc=", "search"=>{"project_id"=>"5139f91fb9b67dbe3a000004", "distributor_id"=>"", "start_date"=>"01/03/2013 - 00:00 AM", "end_date"=>"20/03/2013 - 23:59 PM"}, "commit"=>"Search"}
MOPED: 127.0.0.1:27017 COMMAND database=admin command={:ismaster=>1} (0.5579ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=users selector={"$query"=>{"_id"=>"513f0f9db9b67d884a000002"}, "$orderby"=>{:_id=>1}} flags=[] limit=-1 skip=0 batch_size=nil fields=nil (0.4704ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=organisations selector={"$query"=>{"_id"=>"5139f184b9b67d8e73000001"}, "$orderby"=>{:_id=>1}} flags=[] limit=-1 skip=0 batch_size=nil fields=nil (0.4518ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=projects selector={"deleted_at"=>nil, "status"=>{"$ne"=>"New"}} flags=[] limit=0 skip=0 batch_size=nil fields=nil (1.5078ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=distributors selector={"deleted_at"=>nil, "$and"=>[{"_id"=>{"$in"=>["513c8a70b9b67d35e000000b", "513d6576b9b67dfc6f000044", "513d7874b9b67d94bb00000e", "513d7a52b9b67d94bb000020", "513d7aecb9b67d94bb000023", "513d7d84b9b67d94bb000035", "513d7e38b9b67d94bb000039", "513d7ee9b9b67d94bb00003e", "513d7fcab9b67d94bb000049", "513d80c9b9b67d94bb000058", "513d81c5b9b67dca4c000005", "513d8254b9b67d94bb000063", "513d8307b9b67dca4c00000c", "513d83f2b9b67d94bb00006d", "513d8491b9b67dca4c00000f", "513d84f6b9b67dca4c000018", "513dabf9b9b67d37ca00000d", "513dac88b9b67d37ca000011", "513dacecb9b67d37ca000018", "513dad59b9b67d37ca00001c", "513dadb6b9b67d37ca000020", "513dadffb9b67d37ca000022", "513dae62b9b67d9ecd00000a", "513daefdb9b67d9ecd00000f", "513daf88b9b67d37ca000024", "513db355b9b67d37ca000042", "513db3b2b9b67d37ca000045", "513db3d7b9b67d37ca000047", "513db3f6b9b67d37ca000048", "513db444b9b67d37ca00004b", "513db46fb9b67d37ca00004c", "513db49fb9b67d37ca00004d", "513db4e3b9b67d37ca00004f", "513db50ab9b67d37ca000050", "513db532b9b67d9ecd000013", "513db55eb9b67d9ecd000016", "513db5a3b9b67d9ecd00001a", "513db5cbb9b67d9ecd00001b", "513db5f7b9b67d9ecd00001c", "514021ddb9b67d8ac400000f", "514055a4b9b67db29c000012", "51405742b9b67dab23000009", "514057b9b9b67db29c000018", "514057fcb9b67dab2300000d", "51405834b9b67dab2300000f", "51405b8ab9b67dab23000018", "51405bd2b9b67dab2300001a", "51405c1ab9b67d65bb000002", "51405c66b9b67dab23000020", "51405ca4b9b67dab23000025", "51405de5b9b67d65bb00000a", "51406678b9b67d9114000001", "514066b4b9b67d9114000003", "514066f2b9b67de614000001", "5140677bb9b67de614000004", "51406810b9b67de614000008", "51406873b9b67d9114000005", "514068cbb9b67d9114000008", "5140690cb9b67d911400000a", "51406921b9b67d911400000c", "51415f62b9b67de54900000a", "51415fb4b9b67de549000012", "5141a65eb9b67db4e6000009", "5141b006b9b67d37eb000005", "5141b067b9b67d1e46000036", "5141b0a9b9b67d1e4600003b", "5141c1beb9b67dea43000054", "5141c399b9b67d37eb000039", "51429762b9b67db54e000011", "514297fab9b67db54e00001f", "5142987fb9b67db54e000025", "5142bd08b9b67db499000124", "5142c046b9b67dc5c4000140", "5142c6a8b9b67dbfc8000015", "51431e6cb9b67dc48400000f", "51431e96b9b67dc484000010", "51431eb5b9b67dc484000011", "51431ed1b9b67dc484000014", "51431f1fb9b67d7781000001"]}}]} flags=[] limit=0 skip=0 batch_size=nil fields=nil (8.2681ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=projects selector={"deleted_at"=>nil, "_id"=>"5139f91fb9b67dbe3a000004"} flags=[] limit=0 skip=0 batch_size=nil fields=nil (0.8149ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=unit_sizes selector={"deleted_at"=>nil, "project_id"=>"5139f91fb9b67dbe3a000004"} flags=[] limit=0 skip=0 batch_size=nil fields=nil (0.6528ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"unit_sizes", :query=>{"deleted_at"=>nil, "project_id"=>"5139f91fb9b67dbe3a000004"}} (0.4551ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=distributors selector={"deleted_at"=>nil, "$and"=>[{"_id"=>{"$in"=>["513c8a70b9b67d35e000000b", "513d6576b9b67dfc6f000044", "513d7874b9b67d94bb00000e", "513d7a52b9b67d94bb000020", "513d7aecb9b67d94bb000023", "513d7d84b9b67d94bb000035", "513d7e38b9b67d94bb000039", "513d7ee9b9b67d94bb00003e", "513d7fcab9b67d94bb000049", "513d80c9b9b67d94bb000058", "513d81c5b9b67dca4c000005", "513d8254b9b67d94bb000063", "513d8307b9b67dca4c00000c", "513d83f2b9b67d94bb00006d", "513d8491b9b67dca4c00000f", "513d84f6b9b67dca4c000018", "513dabf9b9b67d37ca00000d", "513dac88b9b67d37ca000011", "513dacecb9b67d37ca000018", "513dad59b9b67d37ca00001c", "513dadb6b9b67d37ca000020", "513dadffb9b67d37ca000022", "513dae62b9b67d9ecd00000a", "513daefdb9b67d9ecd00000f", "513daf88b9b67d37ca000024", "513db355b9b67d37ca000042", "513db3b2b9b67d37ca000045", "513db3d7b9b67d37ca000047", "513db3f6b9b67d37ca000048", "513db444b9b67d37ca00004b", "513db46fb9b67d37ca00004c", "513db49fb9b67d37ca00004d", "513db4e3b9b67d37ca00004f", "513db50ab9b67d37ca000050", "513db532b9b67d9ecd000013", "513db55eb9b67d9ecd000016", "513db5a3b9b67d9ecd00001a", "513db5cbb9b67d9ecd00001b", "513db5f7b9b67d9ecd00001c", "514021ddb9b67d8ac400000f", "514055a4b9b67db29c000012", "51405742b9b67dab23000009", "514057b9b9b67db29c000018", "514057fcb9b67dab2300000d", "51405834b9b67dab2300000f", "51405b8ab9b67dab23000018", "51405bd2b9b67dab2300001a", "51405c1ab9b67d65bb000002", "51405c66b9b67dab23000020", "51405ca4b9b67dab23000025", "51405de5b9b67d65bb00000a", "51406678b9b67d9114000001", "514066b4b9b67d9114000003", "514066f2b9b67de614000001", "5140677bb9b67de614000004", "51406810b9b67de614000008", "51406873b9b67d9114000005", "514068cbb9b67d9114000008", "5140690cb9b67d911400000a", "51406921b9b67d911400000c", "51415f62b9b67de54900000a", "51415fb4b9b67de549000012", "5141a65eb9b67db4e6000009", "5141b006b9b67d37eb000005", "5141b067b9b67d1e46000036", "5141b0a9b9b67d1e4600003b", "5141c1beb9b67dea43000054", "5141c399b9b67d37eb000039", "51429762b9b67db54e000011", "514297fab9b67db54e00001f", "5142987fb9b67db54e000025", "5142bd08b9b67db499000124", "5142c046b9b67dc5c4000140", "5142c6a8b9b67dbfc8000015", "51431e6cb9b67dc48400000f", "51431e96b9b67dc484000010", "51431eb5b9b67dc484000011", "51431ed1b9b67dc484000014", "51431f1fb9b67d7781000001"]}}]} flags=[] limit=0 skip=0 batch_size=nil fields=nil (8.6279ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513c8a70b9b67d35e000000b", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3031ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513c8a70b9b67d35e000000b", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.9867ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513c8a70b9b67d35e000000b", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (1.9574ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513c8a70b9b67d35e000000b", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (3.7925ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51430f15b9b67d6a65000064"}} (1.3075ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51430f15b9b67d6a65000064"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (20.8781ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5143116eb9b67dba5800005e"}} (1.5202ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5143116eb9b67dba5800005e"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (2.9356ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51431473b9b67dba580000c6"}} (1.3494ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51431473b9b67dba580000c6"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.5748ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"514400a7b9b67dc101000014"}} (1.2462ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"514400a7b9b67dc101000014"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.0084ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"514589eab9b67dd641000047"}} (1.3976ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"514589eab9b67dd641000047"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.6585ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5146da1cb9b67d8ee7000020"}} (1.2939ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5146da1cb9b67d8ee7000020"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.4838ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5148027db9b67d9df8000031"}} (1.5996ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5148027db9b67d9df8000031"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.5868ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513c8a70b9b67d35e000000b", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3558ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.paid_amount,\n min: this.paid_amount,\n sum: this.paid_amount\n };\n emit(\"paid_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"513c8a70b9b67d35e000000b", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (6.6519ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513c8a70b9b67d35e000000b", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3916ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.booking_amount,\n min: this.booking_amount,\n sum: this.booking_amount\n };\n emit(\"booking_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"513c8a70b9b67d35e000000b", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (6.6581ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d6576b9b67dfc6f000044", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2731ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d6576b9b67dfc6f000044", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2285ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d6576b9b67dfc6f000044", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.3093ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513d6576b9b67dfc6f000044", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.0154ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d6576b9b67dfc6f000044", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1951ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d6576b9b67dfc6f000044", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1498ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7874b9b67d94bb00000e", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2526ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7874b9b67d94bb00000e", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.4765ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7874b9b67d94bb00000e", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.1784ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513d7874b9b67d94bb00000e", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.0568ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7874b9b67d94bb00000e", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.9789ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7874b9b67d94bb00000e", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1405ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7a52b9b67d94bb000020", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3708ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7a52b9b67d94bb000020", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2781ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7a52b9b67d94bb000020", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.1513ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513d7a52b9b67d94bb000020", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (1.9519ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7a52b9b67d94bb000020", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2278ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7a52b9b67d94bb000020", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.9054ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7aecb9b67d94bb000023", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1350ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7aecb9b67d94bb000023", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2364ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7aecb9b67d94bb000023", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.2597ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513d7aecb9b67d94bb000023", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.0778ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7aecb9b67d94bb000023", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.0101ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7aecb9b67d94bb000023", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1996ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7d84b9b67d94bb000035", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2769ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7d84b9b67d94bb000035", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1954ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7d84b9b67d94bb000035", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.1579ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513d7d84b9b67d94bb000035", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.1448ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7d84b9b67d94bb000035", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2557ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7d84b9b67d94bb000035", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1253ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7e38b9b67d94bb000039", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3122ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7e38b9b67d94bb000039", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.6770ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7e38b9b67d94bb000039", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (1.3564ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513d7e38b9b67d94bb000039", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (1.0955ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7e38b9b67d94bb000039", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.2293ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7e38b9b67d94bb000039", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.2059ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7ee9b9b67d94bb00003e", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.0669ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7ee9b9b67d94bb00003e", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1212ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7ee9b9b67d94bb00003e", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.2402ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513d7ee9b9b67d94bb00003e", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.1021ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7ee9b9b67d94bb00003e", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2364ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7ee9b9b67d94bb00003e", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2593ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7fcab9b67d94bb000049", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2895ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7fcab9b67d94bb000049", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3103ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7fcab9b67d94bb000049", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.3961ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513d7fcab9b67d94bb000049", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (1.9524ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7fcab9b67d94bb000049", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2659ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d7fcab9b67d94bb000049", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1226ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d80c9b9b67d94bb000058", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2027ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d80c9b9b67d94bb000058", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1870ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d80c9b9b67d94bb000058", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.1374ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513d80c9b9b67d94bb000058", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.0227ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d80c9b9b67d94bb000058", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2669ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d80c9b9b67d94bb000058", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1985ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d81c5b9b67dca4c000005", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2888ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d81c5b9b67dca4c000005", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3863ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d81c5b9b67dca4c000005", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.2533ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513d81c5b9b67dca4c000005", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.1834ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d81c5b9b67dca4c000005", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.0745ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d81c5b9b67dca4c000005", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.0514ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d8254b9b67d94bb000063", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3518ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d8254b9b67d94bb000063", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2316ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d8254b9b67d94bb000063", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.0652ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513d8254b9b67d94bb000063", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (1.9655ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d8254b9b67d94bb000063", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2168ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d8254b9b67d94bb000063", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.0459ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d8307b9b67dca4c00000c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2864ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d8307b9b67dca4c00000c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (3.1288ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d8307b9b67dca4c00000c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.2061ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513d8307b9b67dca4c00000c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.0533ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d8307b9b67dca4c00000c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (3.1366ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d8307b9b67dca4c00000c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.4924ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d83f2b9b67d94bb00006d", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3890ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d83f2b9b67d94bb00006d", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2550ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d83f2b9b67d94bb00006d", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.3131ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513d83f2b9b67d94bb00006d", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.0220ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d83f2b9b67d94bb00006d", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.9410ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d83f2b9b67d94bb00006d", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.9376ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d8491b9b67dca4c00000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.0006ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d8491b9b67dca4c00000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.4674ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d8491b9b67dca4c00000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.4228ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513d8491b9b67dca4c00000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.1229ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d8491b9b67dca4c00000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.0342ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d8491b9b67dca4c00000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1451ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d84f6b9b67dca4c000018", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3386ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d84f6b9b67dca4c000018", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3136ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d84f6b9b67dca4c000018", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.1875ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513d84f6b9b67dca4c000018", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (1.9968ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d84f6b9b67dca4c000018", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2357ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513d84f6b9b67dca4c000018", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.9650ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dabf9b9b67d37ca00000d", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2476ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dabf9b9b67d37ca00000d", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1775ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dabf9b9b67d37ca00000d", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.3425ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513dabf9b9b67d37ca00000d", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.0995ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dabf9b9b67d37ca00000d", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.9267ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dabf9b9b67d37ca00000d", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2030ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dac88b9b67d37ca000011", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2454ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dac88b9b67d37ca000011", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1951ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dac88b9b67d37ca000011", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.2197ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513dac88b9b67d37ca000011", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.0900ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dac88b9b67d37ca000011", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.9929ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dac88b9b67d37ca000011", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1741ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dacecb9b67d37ca000018", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1172ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dacecb9b67d37ca000018", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2335ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dacecb9b67d37ca000018", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.3377ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513dacecb9b67d37ca000018", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.2180ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dacecb9b67d37ca000018", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1386ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dacecb9b67d37ca000018", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.0244ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dad59b9b67d37ca00001c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1968ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dad59b9b67d37ca00001c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1560ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dad59b9b67d37ca00001c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.1007ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513dad59b9b67d37ca00001c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.0273ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dad59b9b67d37ca00001c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1060ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dad59b9b67d37ca00001c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.0804ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dadb6b9b67d37ca000020", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2721ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dadb6b9b67d37ca000020", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2159ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dadb6b9b67d37ca000020", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.3923ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513dadb6b9b67d37ca000020", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.2211ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dadb6b9b67d37ca000020", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.6472ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dadb6b9b67d37ca000020", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.5244ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dadffb9b67d37ca000022", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.5015ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dadffb9b67d37ca000022", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3777ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dadffb9b67d37ca000022", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.5692ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513dadffb9b67d37ca000022", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.1417ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dadffb9b67d37ca000022", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.0819ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dadffb9b67d37ca000022", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1579ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dae62b9b67d9ecd00000a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3329ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dae62b9b67d9ecd00000a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2197ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dae62b9b67d9ecd00000a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.0764ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513dae62b9b67d9ecd00000a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.0659ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dae62b9b67d9ecd00000a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1603ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513dae62b9b67d9ecd00000a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1071ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513daefdb9b67d9ecd00000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2340ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513daefdb9b67d9ecd00000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1358ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513daefdb9b67d9ecd00000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.1715ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513daefdb9b67d9ecd00000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.0180ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513daefdb9b67d9ecd00000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1627ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513daefdb9b67d9ecd00000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1465ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513daf88b9b67d37ca000024", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2759ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513daf88b9b67d37ca000024", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2960ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513daf88b9b67d37ca000024", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.3036ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513daf88b9b67d37ca000024", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.2440ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513daf88b9b67d37ca000024", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1081ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513daf88b9b67d37ca000024", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.6517ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db355b9b67d37ca000042", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.4757ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db355b9b67d37ca000042", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3162ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db355b9b67d37ca000042", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.2118ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513db355b9b67d37ca000042", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.1477ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db355b9b67d37ca000042", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2235ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db355b9b67d37ca000042", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.0461ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db3b2b9b67d37ca000045", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.6557ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db3b2b9b67d37ca000045", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.5327ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db3b2b9b67d37ca000045", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.4822ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513db3b2b9b67d37ca000045", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (13.5419ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5142f253b9b67df4e7000021"}} (1.4677ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5142f253b9b67df4e7000021"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (4.0867ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51431026b9b67d6a6500007c"}} (1.3611ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51431026b9b67d6a6500007c"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.7980ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51433e35b9b67d4b6b000003"}} (1.4088ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51433e35b9b67d4b6b000003"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.7096ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51444429b9b67de8ad000077"}} (1.4389ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51444429b9b67de8ad000077"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.6192ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51444f22b9b67df6d8000064"}} (1.3356ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51444f22b9b67df6d8000064"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.6349ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"514573cbb9b67dc3e9000001"}} (1.3180ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"514573cbb9b67dc3e9000001"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.6836ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51458804b9b67dd641000028"}} (1.4162ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51458804b9b67dd641000028"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.7739ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51458a76b9b67d0aa700002a"}} (1.4329ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51458a76b9b67d0aa700002a"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.6128ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51458b9bb9b67dd64100007d"}} (1.3392ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51458b9bb9b67dd64100007d"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.6678ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5146cc2cb9b67d635c00001b"}} (1.3039ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5146cc2cb9b67d635c00001b"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.6466ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51481b5fb9b67d1ff600003c"}} (1.4086ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51481b5fb9b67d1ff600003c"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.6697ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"514821aeb9b67dbeb900000f"}} (1.4167ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"514821aeb9b67dbeb900000f"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.7100ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db3b2b9b67d37ca000045", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.4581ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.paid_amount,\n min: this.paid_amount,\n sum: this.paid_amount\n };\n emit(\"paid_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"513db3b2b9b67d37ca000045", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (7.0558ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db3b2b9b67d37ca000045", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2173ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.booking_amount,\n min: this.booking_amount,\n sum: this.booking_amount\n };\n emit(\"booking_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"513db3b2b9b67d37ca000045", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.0186ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db3d7b9b67d37ca000047", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.3127ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db3d7b9b67d37ca000047", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.2074ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db3d7b9b67d37ca000047", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (1.2171ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513db3d7b9b67d37ca000047", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (1.0586ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db3d7b9b67d37ca000047", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.1129ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db3d7b9b67d37ca000047", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.1551ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db3f6b9b67d37ca000048", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.2434ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db3f6b9b67d37ca000048", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.1630ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db3f6b9b67d37ca000048", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (0.7985ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513db3f6b9b67d37ca000048", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (0.6549ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db3f6b9b67d37ca000048", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (0.6526ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db3f6b9b67d37ca000048", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (0.6409ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db444b9b67d37ca00004b", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (0.7668ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db444b9b67d37ca00004b", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (0.8609ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db444b9b67d37ca00004b", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (1.8032ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513db444b9b67d37ca00004b", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (0.8111ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db444b9b67d37ca00004b", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.0610ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db444b9b67d37ca00004b", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.1044ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db46fb9b67d37ca00004c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.2434ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db46fb9b67d37ca00004c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.0915ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db46fb9b67d37ca00004c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (1.0493ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513db46fb9b67d37ca00004c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (0.9515ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db46fb9b67d37ca00004c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.8265ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db46fb9b67d37ca00004c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (0.9439ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db49fb9b67d37ca00004d", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.0405ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db49fb9b67d37ca00004d", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.4091ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db49fb9b67d37ca00004d", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (1.5256ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513db49fb9b67d37ca00004d", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.4292ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5145c7a3b9b67da0a8000055"}} (1.0598ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5145c7a3b9b67da0a8000055"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (2.6736ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"514722adb9b67d9f9b000083"}} (0.9682ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"514722adb9b67d9f9b000083"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (2.7826ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db49fb9b67d37ca00004d", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.2410ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.paid_amount,\n min: this.paid_amount,\n sum: this.paid_amount\n };\n emit(\"paid_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"513db49fb9b67d37ca00004d", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (2.5299ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db49fb9b67d37ca00004d", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.1876ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.booking_amount,\n min: this.booking_amount,\n sum: this.booking_amount\n };\n emit(\"booking_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"513db49fb9b67d37ca00004d", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (2.2836ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db4e3b9b67d37ca00004f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.9274ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db4e3b9b67d37ca00004f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.8964ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db4e3b9b67d37ca00004f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.1715ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513db4e3b9b67d37ca00004f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (4.8802ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51441866b9b67dad8c00009c"}} (1.5533ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51441866b9b67dad8c00009c"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (4.1060ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51441b1db9b67d8c6300004b"}} (1.4367ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51441b1db9b67d8c6300004b"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.7251ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5145e451b9b67d105f000002"}} (1.5030ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5145e451b9b67d105f000002"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.7785ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db4e3b9b67d37ca00004f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2807ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.paid_amount,\n min: this.paid_amount,\n sum: this.paid_amount\n };\n emit(\"paid_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"513db4e3b9b67d37ca00004f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (5.5745ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db4e3b9b67d37ca00004f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.0056ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.booking_amount,\n min: this.booking_amount,\n sum: this.booking_amount\n };\n emit(\"booking_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"513db4e3b9b67d37ca00004f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (5.3029ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db50ab9b67d37ca000050", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3708ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db50ab9b67d37ca000050", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2919ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db50ab9b67d37ca000050", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.3201ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513db50ab9b67d37ca000050", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.1205ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db50ab9b67d37ca000050", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.0790ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db50ab9b67d37ca000050", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.4123ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db532b9b67d9ecd000013", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.4390ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db532b9b67d9ecd000013", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3410ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db532b9b67d9ecd000013", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.3062ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513db532b9b67d9ecd000013", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.1079ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db532b9b67d9ecd000013", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.0981ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db532b9b67d9ecd000013", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3255ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db55eb9b67d9ecd000016", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1265ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db55eb9b67d9ecd000016", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3179ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db55eb9b67d9ecd000016", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.5885ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513db55eb9b67d9ecd000016", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.0764ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db55eb9b67d9ecd000016", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1241ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db55eb9b67d9ecd000016", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1365ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db5a3b9b67d9ecd00001a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.4538ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db5a3b9b67d9ecd00001a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3136ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db5a3b9b67d9ecd00001a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.1832ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513db5a3b9b67d9ecd00001a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (1.9279ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db5a3b9b67d9ecd00001a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.0504ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db5a3b9b67d9ecd00001a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2514ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db5cbb9b67d9ecd00001b", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2573ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db5cbb9b67d9ecd00001b", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2337ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db5cbb9b67d9ecd00001b", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.2285ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513db5cbb9b67d9ecd00001b", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (1.8146ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db5cbb9b67d9ecd00001b", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.7946ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db5cbb9b67d9ecd00001b", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (0.9422ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db5f7b9b67d9ecd00001c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1510ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db5f7b9b67d9ecd00001c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1772ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db5f7b9b67d9ecd00001c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (1.9512ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"513db5f7b9b67d9ecd00001c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (1.8756ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db5f7b9b67d9ecd00001c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2199ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"513db5f7b9b67d9ecd00001c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2337ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514021ddb9b67d8ac400000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.7773ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514021ddb9b67d8ac400000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.7030ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514021ddb9b67d8ac400000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (0.9696ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"514021ddb9b67d8ac400000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (19.6543ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51457c76b9b67de3db000015"}} (0.7360ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51457c76b9b67de3db000015"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (1.7874ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5141e6cbb9b67da67100001f"}} (1.0188ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5141e6cbb9b67da67100001f"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (2.4619ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5141ecbbb9b67d8ef8000080"}} (0.7455ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5141ecbbb9b67d8ef8000080"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (2.0192ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5142b816b9b67db4990000cd"}} (1.1082ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5142b816b9b67db4990000cd"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.3557ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5142c842b9b67dbfc8000027"}} (1.2145ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5142c842b9b67dbfc8000027"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (4.0479ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5142d7c4b9b67d2e4f000043"}} (0.9882ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5142d7c4b9b67d2e4f000043"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.5903ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5142f838b9b67d2fa1000020"}} (1.3630ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5142f838b9b67d2fa1000020"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.9229ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51430d8db9b67d6a65000019"}} (1.3950ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51430d8db9b67d6a65000019"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.4552ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51430f36b9b67dba58000043"}} (1.2162ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51430f36b9b67dba58000043"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.5992ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51432b2fb9b67d1b7b000005"}} (1.3940ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51432b2fb9b67d1b7b000005"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.5744ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51444dd1b9b67d2223000065"}} (1.3402ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51444dd1b9b67d2223000065"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.6304ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51457a83b9b67dc3e900003e"}} (1.3881ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51457a83b9b67dc3e900003e"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.8664ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51457c76b9b67de3db000014"}} (1.4017ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51457c76b9b67de3db000014"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.5348ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51457dccb9b67de3db00004b"}} (1.3402ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51457dccb9b67de3db00004b"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.4866ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51458877b9b67d0aa7000003"}} (1.3649ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51458877b9b67d0aa7000003"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.5241ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5145a133b9b67d983b000001"}} (1.3182ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5145a133b9b67d983b000001"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.6345ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5145c085b9b67da0a800000a"}} (1.4167ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5145c085b9b67da0a800000a"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.6564ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5145d682b9b67ddf81000026"}} (1.3824ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5145d682b9b67ddf81000026"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.7150ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5145f7fbb9b67d105f000023"}} (1.2770ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5145f7fbb9b67d105f000023"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.6089ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5146ad2eb9b67db3cb00009e"}} (1.3294ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5146ad2eb9b67db3cb00009e"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.6044ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5146d274b9b67de72e00004e"}} (1.4405ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5146d274b9b67de72e00004e"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.7327ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5147027cb9b67da4e8000004"}} (1.4029ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5147027cb9b67da4e8000004"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.5453ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5147027cb9b67da4e8000005"}} (1.4412ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5147078db9b67da4e8000035"}} (1.3757ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5147078db9b67da4e8000035"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.5856ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514021ddb9b67d8ac400000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.6591ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.paid_amount,\n min: this.paid_amount,\n sum: this.paid_amount\n };\n emit(\"paid_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"514021ddb9b67d8ac400000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (11.8432ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514021ddb9b67d8ac400000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.4910ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.booking_amount,\n min: this.booking_amount,\n sum: this.booking_amount\n };\n emit(\"booking_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"514021ddb9b67d8ac400000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (8.4574ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514055a4b9b67db29c000012", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3506ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514055a4b9b67db29c000012", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3439ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514055a4b9b67db29c000012", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.2240ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"514055a4b9b67db29c000012", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (3.9356ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5145b557b9b67d7437000071"}} (1.4937ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5145b557b9b67d7437000071"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.6492ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51473152b9b67d9f9b0000c9"}} (1.3592ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51473152b9b67d9f9b0000c9"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.6724ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514055a4b9b67db29c000012", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3293ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.paid_amount,\n min: this.paid_amount,\n sum: this.paid_amount\n };\n emit(\"paid_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"514055a4b9b67db29c000012", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (5.3599ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514055a4b9b67db29c000012", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1346ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.booking_amount,\n min: this.booking_amount,\n sum: this.booking_amount\n };\n emit(\"booking_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"514055a4b9b67db29c000012", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (5.3816ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405742b9b67dab23000009", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2681ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405742b9b67dab23000009", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3017ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405742b9b67dab23000009", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.2733ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"51405742b9b67dab23000009", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.2621ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405742b9b67dab23000009", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1966ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405742b9b67dab23000009", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.0466ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514057b9b9b67db29c000018", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.4960ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514057b9b9b67db29c000018", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1996ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514057b9b9b67db29c000018", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.2404ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"514057b9b9b67db29c000018", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.0723ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514057b9b9b67db29c000018", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2016ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514057b9b9b67db29c000018", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1625ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514057fcb9b67dab2300000d", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2328ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514057fcb9b67dab2300000d", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2824ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514057fcb9b67dab2300000d", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.2337ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"514057fcb9b67dab2300000d", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (1.9112ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514057fcb9b67dab2300000d", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2035ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514057fcb9b67dab2300000d", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1133ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405834b9b67dab2300000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.8939ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405834b9b67dab2300000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3055ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405834b9b67dab2300000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.2573ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"51405834b9b67dab2300000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (4.7245ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5144243db9b67d59de000015"}} (1.4284ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5144243db9b67d59de000015"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.6438ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5146b921b9b67d36d00000fd"}} (1.3788ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5146b921b9b67d36d00000fd"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.9723ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51471d73b9b67d9f9b000061"}} (1.4291ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51471d73b9b67d9f9b000061"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.6218ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405834b9b67dab2300000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2383ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.paid_amount,\n min: this.paid_amount,\n sum: this.paid_amount\n };\n emit(\"paid_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"51405834b9b67dab2300000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (5.4317ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405834b9b67dab2300000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1968ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.booking_amount,\n min: this.booking_amount,\n sum: this.booking_amount\n };\n emit(\"booking_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"51405834b9b67dab2300000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (5.5552ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405b8ab9b67dab23000018", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2421ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405b8ab9b67dab23000018", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3611ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405b8ab9b67dab23000018", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.2669ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"51405b8ab9b67dab23000018", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.1412ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405b8ab9b67dab23000018", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2118ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405b8ab9b67dab23000018", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1839ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405bd2b9b67dab2300001a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3806ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405bd2b9b67dab2300001a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3060ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405bd2b9b67dab2300001a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.2235ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"51405bd2b9b67dab2300001a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.0714ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405bd2b9b67dab2300001a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1966ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405bd2b9b67dab2300001a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.4247ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405c1ab9b67d65bb000002", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2826ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405c1ab9b67d65bb000002", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2862ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405c1ab9b67d65bb000002", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.1780ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"51405c1ab9b67d65bb000002", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.1112ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405c1ab9b67d65bb000002", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.0347ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405c1ab9b67d65bb000002", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2473ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405c66b9b67dab23000020", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2757ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405c66b9b67dab23000020", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3141ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405c66b9b67dab23000020", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.3618ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"51405c66b9b67dab23000020", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.1009ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405c66b9b67dab23000020", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1896ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405c66b9b67dab23000020", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.0535ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405ca4b9b67dab23000025", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2781ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405ca4b9b67dab23000025", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2175ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405ca4b9b67dab23000025", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.2292ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"51405ca4b9b67dab23000025", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.1486ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405ca4b9b67dab23000025", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.0213ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405ca4b9b67dab23000025", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.9581ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405de5b9b67d65bb00000a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2357ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405de5b9b67d65bb00000a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2888ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405de5b9b67d65bb00000a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.0783ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"51405de5b9b67d65bb00000a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.1033ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405de5b9b67d65bb00000a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.0199ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51405de5b9b67d65bb00000a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.4085ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51406678b9b67d9114000001", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.8069ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51406678b9b67d9114000001", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (3.3331ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51406678b9b67d9114000001", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.5263ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"51406678b9b67d9114000001", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (8.3890ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5141bf94b9b67dea4300002c"}} (1.3022ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5141bf94b9b67dea4300002c"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (1.8055ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5141c21ab9b67dea43000055"}} (1.0188ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5141c21ab9b67dea43000055"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.4983ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5143319db9b67d69e500000f"}} (0.9398ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5143319db9b67d69e500000f"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (1.9181ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5145c3eab9b67d53a200000b"}} (0.9949ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5145c3eab9b67d53a200000b"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (2.2209ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5145c480b9b67d53a2000029"}} (0.9820ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5145c480b9b67d53a2000029"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.0074ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5146ee53b9b67d8d6a000034"}} (1.4100ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5146ee53b9b67d8d6a000034"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.5238ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5146f0d6b9b67d6ec4000017"}} (1.4300ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5146f0d6b9b67d6ec4000017"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.5312ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51406678b9b67d9114000001", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.4822ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.paid_amount,\n min: this.paid_amount,\n sum: this.paid_amount\n };\n emit(\"paid_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"51406678b9b67d9114000001", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (6.3825ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51406678b9b67d9114000001", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3205ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.booking_amount,\n min: this.booking_amount,\n sum: this.booking_amount\n };\n emit(\"booking_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"51406678b9b67d9114000001", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (6.3732ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514066b4b9b67d9114000003", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.6715ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514066b4b9b67d9114000003", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.6617ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514066b4b9b67d9114000003", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.4567ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"514066b4b9b67d9114000003", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (15.2769ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5141b852b9b67d6f9e000028"}} (1.3599ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5141b852b9b67d6f9e000028"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (1.8773ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5141b920b9b67d6f9e00004d"}} (1.4374ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5141b920b9b67d6f9e00004d"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.2763ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5141fef1b9b67de8e200002e"}} (0.8471ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5141fef1b9b67de8e200002e"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.6511ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5141fef1b9b67de8e200002f"}} (1.3521ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5141fef1b9b67de8e200002f"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (2.9829ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51420362b9b67de8e2000068"}} (1.3061ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51420362b9b67de8e2000068"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.6316ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51420362b9b67de8e2000069"}} (0.8190ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51420362b9b67de8e2000069"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.4790ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5142899eb9b67d578f000006"}} (0.5791ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5142899eb9b67d578f000006"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.3784ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5142a8b6b9b67dc5c4000076"}} (1.3463ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5142a8b6b9b67dc5c4000076"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.4790ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5142bb39b9b67dc5c4000114"}} (1.3444ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5142bb39b9b67dc5c4000114"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.0379ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51443da1b9b67d2190000047"}} (0.8750ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51443da1b9b67d2190000047"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.5830ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"514450b5b9b67df6d8000098"}} (1.2875ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"514450b5b9b67df6d8000098"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.4525ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51445547b9b67df6d80000c9"}} (1.4052ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51445547b9b67df6d80000c9"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.7324ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5145ac0db9b67d7437000036"}} (1.2982ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5145ac0db9b67d7437000036"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.5925ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51470bdbb9b67da4e800005a"}} (1.3728ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51470bdbb9b67da4e800005a"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.3884ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514066b4b9b67d9114000003", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.4762ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.paid_amount,\n min: this.paid_amount,\n sum: this.paid_amount\n };\n emit(\"paid_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"514066b4b9b67d9114000003", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (7.5214ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514066b4b9b67d9114000003", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3518ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.booking_amount,\n min: this.booking_amount,\n sum: this.booking_amount\n };\n emit(\"booking_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"514066b4b9b67d9114000003", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (7.2172ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514066f2b9b67de614000001", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3727ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514066f2b9b67de614000001", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2669ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514066f2b9b67de614000001", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.2421ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"514066f2b9b67de614000001", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (1.9929ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514066f2b9b67de614000001", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2554ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514066f2b9b67de614000001", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.0020ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5140677bb9b67de614000004", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3487ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5140677bb9b67de614000004", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.7907ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5140677bb9b67de614000004", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.3427ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"5140677bb9b67de614000004", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.0437ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5140677bb9b67de614000004", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1172ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5140677bb9b67de614000004", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1927ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51406810b9b67de614000008", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3122ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51406810b9b67de614000008", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3994ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51406810b9b67de614000008", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.2125ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"51406810b9b67de614000008", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.1029ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51406810b9b67de614000008", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.9786ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51406810b9b67de614000008", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1224ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51406873b9b67d9114000005", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.4025ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51406873b9b67d9114000005", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2316ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51406873b9b67d9114000005", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.3475ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"51406873b9b67d9114000005", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.0642ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51406873b9b67d9114000005", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1603ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51406873b9b67d9114000005", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1656ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514068cbb9b67d9114000008", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3115ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514068cbb9b67d9114000008", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2848ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514068cbb9b67d9114000008", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.2397ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"514068cbb9b67d9114000008", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.1546ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514068cbb9b67d9114000008", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1803ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514068cbb9b67d9114000008", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1560ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5140690cb9b67d911400000a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3634ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5140690cb9b67d911400000a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2805ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5140690cb9b67d911400000a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.3112ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"5140690cb9b67d911400000a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (1.9264ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5140690cb9b67d911400000a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2407ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5140690cb9b67d911400000a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2047ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51406921b9b67d911400000c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3618ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51406921b9b67d911400000c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3158ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51406921b9b67d911400000c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.3086ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"51406921b9b67d911400000c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.0771ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51406921b9b67d911400000c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2337ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51406921b9b67d911400000c", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1906ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51415f62b9b67de54900000a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2576ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51415f62b9b67de54900000a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2461ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51415f62b9b67de54900000a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.2409ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"51415f62b9b67de54900000a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (6.0580ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5143020ab9b67d2fa1000085"}} (1.3514ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5143020ab9b67d2fa1000085"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.7255ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5143020ab9b67d2fa1000086"}} (1.3926ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5143020ab9b67defa6000060"}} (1.3695ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5143020ab9b67defa6000060"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.6147ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51430f07b9b67d6a65000050"}} (1.3378ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51430f07b9b67d6a65000050"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.5863ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"514312f2b9b67dba58000088"}} (1.4648ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"514312f2b9b67dba58000088"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.6106ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5143142ab9b67dba580000ad"}} (1.4045ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5143142ab9b67dba580000ad"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.5968ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51415f62b9b67de54900000a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3122ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.paid_amount,\n min: this.paid_amount,\n sum: this.paid_amount\n };\n emit(\"paid_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"51415f62b9b67de54900000a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (5.9540ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51415f62b9b67de54900000a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2979ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.booking_amount,\n min: this.booking_amount,\n sum: this.booking_amount\n };\n emit(\"booking_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"51415f62b9b67de54900000a", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (5.9392ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51415fb4b9b67de549000012", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.4579ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51415fb4b9b67de549000012", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3818ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51415fb4b9b67de549000012", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.4405ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"51415fb4b9b67de549000012", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (7.2677ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5143382db9b67d0e46000020"}} (1.5051ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5143382db9b67d0e46000020"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.6299ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51433987b9b67d0e46000047"}} (1.3924ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51433987b9b67d0e46000047"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.6500ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"514316e8b9b67d466d000005"}} (1.4901ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"514316e8b9b67d466d000005"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.5765ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51431779b9b67dba580000f3"}} (1.5728ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51431779b9b67dba580000f3"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.5172ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51431a91b9b67dba5800011b"}} (1.4336ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51431a91b9b67dba5800011b"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.5138ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51431b2eb9b67dba58000142"}} (1.3556ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51431b2eb9b67dba58000142"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (4.2610ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51433785b9b67d0e46000001"}} (1.3809ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51433785b9b67d0e46000001"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.7210ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51415fb4b9b67de549000012", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3694ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.paid_amount,\n min: this.paid_amount,\n sum: this.paid_amount\n };\n emit(\"paid_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"51415fb4b9b67de549000012", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (5.9760ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51415fb4b9b67de549000012", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2652ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.booking_amount,\n min: this.booking_amount,\n sum: this.booking_amount\n };\n emit(\"booking_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"51415fb4b9b67de549000012", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (6.1715ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141a65eb9b67db4e6000009", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.7826ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141a65eb9b67db4e6000009", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.4409ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141a65eb9b67db4e6000009", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.3501ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"5141a65eb9b67db4e6000009", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (6.5060ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5141c978b9b67dfd8a000002"}} (1.3659ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5141c978b9b67dfd8a000002"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (1.9543ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5142bb2eb9b67dc5c4000100"}} (0.7684ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5142bb2eb9b67dc5c4000100"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (1.7819ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5142e897b9b67d5a9100005d"}} (1.4184ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5142e897b9b67d5a9100005d"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.6325ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51443fafb9b67de8ad00003c"}} (1.3707ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51443fafb9b67de8ad00003c"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (4.1330ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5146df0cb9b67d3a1c000040"}} (1.1954ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5146df0cb9b67d3a1c000040"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.6209ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141a65eb9b67db4e6000009", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3518ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.paid_amount,\n min: this.paid_amount,\n sum: this.paid_amount\n };\n emit(\"paid_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"5141a65eb9b67db4e6000009", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (6.0084ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141a65eb9b67db4e6000009", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1245ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.booking_amount,\n min: this.booking_amount,\n sum: this.booking_amount\n };\n emit(\"booking_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"5141a65eb9b67db4e6000009", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (5.6407ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141b006b9b67d37eb000005", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.3685ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141b006b9b67d37eb000005", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1780ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141b006b9b67d37eb000005", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.3661ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"5141b006b9b67d37eb000005", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (7.0834ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51441c88b9b67d8c6300006e"}} (1.4374ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51441c88b9b67d8c6300006e"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.7284ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51453993b9b67d956700000f"}} (1.7905ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51453993b9b67d956700000f"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (4.0586ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51456abdb9b67dafde000007"}} (1.4050ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51456abdb9b67dafde000007"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.9179ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5145702eb9b67dafde000041"}} (1.3566ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5145702eb9b67dafde000041"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.9501ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"5148262cb9b67dbeb900003e"}} (1.4093ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"5148262cb9b67dbeb900003e"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.7093ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141b006b9b67d37eb000005", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2876ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.paid_amount,\n min: this.paid_amount,\n sum: this.paid_amount\n };\n emit(\"paid_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"5141b006b9b67d37eb000005", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (5.7828ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141b006b9b67d37eb000005", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2378ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.booking_amount,\n min: this.booking_amount,\n sum: this.booking_amount\n };\n emit(\"booking_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"5141b006b9b67d37eb000005", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (6.3148ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141b067b9b67d1e46000036", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.4827ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141b067b9b67d1e46000036", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1985ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141b067b9b67d1e46000036", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.2659ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"5141b067b9b67d1e46000036", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.1284ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141b067b9b67d1e46000036", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.0108ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141b067b9b67d1e46000036", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2223ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141b0a9b9b67d1e4600003b", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.0752ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141b0a9b9b67d1e4600003b", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3100ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141b0a9b9b67d1e4600003b", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.0812ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"5141b0a9b9b67d1e4600003b", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (1.9996ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141b0a9b9b67d1e4600003b", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1119ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141b0a9b9b67d1e4600003b", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1067ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141c1beb9b67dea43000054", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2249ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141c1beb9b67dea43000054", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2380ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141c1beb9b67dea43000054", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.1007ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"5141c1beb9b67dea43000054", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.0304ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141c1beb9b67dea43000054", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1083ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141c1beb9b67dea43000054", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1007ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141c399b9b67d37eb000039", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2681ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141c399b9b67d37eb000039", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2986ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141c399b9b67d37eb000039", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.2638ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"5141c399b9b67d37eb000039", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (1.9972ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141c399b9b67d37eb000039", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1918ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5141c399b9b67d37eb000039", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.9650ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51429762b9b67db54e000011", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.5327ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51429762b9b67db54e000011", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3787ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51429762b9b67db54e000011", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.3446ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"51429762b9b67db54e000011", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.1453ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51429762b9b67db54e000011", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1341ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51429762b9b67db54e000011", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1358ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514297fab9b67db54e00001f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.9383ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514297fab9b67db54e00001f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.6405ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514297fab9b67db54e00001f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.0397ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"514297fab9b67db54e00001f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (1.8077ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514297fab9b67db54e00001f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.9000ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"514297fab9b67db54e00001f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.6019ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5142987fb9b67db54e000025", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.3566ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5142987fb9b67db54e000025", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2240ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5142987fb9b67db54e000025", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.1038ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"5142987fb9b67db54e000025", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.0051ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5142987fb9b67db54e000025", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1293ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5142987fb9b67db54e000025", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1310ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5142bd08b9b67db499000124", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3134ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5142bd08b9b67db499000124", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1629ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5142bd08b9b67db499000124", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.1911ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"5142bd08b9b67db499000124", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.0754ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5142bd08b9b67db499000124", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2032ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5142bd08b9b67db499000124", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.9352ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5142c046b9b67dc5c4000140", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1951ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5142c046b9b67dc5c4000140", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3313ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5142c046b9b67dc5c4000140", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.2311ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"5142c046b9b67dc5c4000140", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.1007ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5142c046b9b67dc5c4000140", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1219ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5142c046b9b67dc5c4000140", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1858ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5142c6a8b9b67dbfc8000015", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2395ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5142c6a8b9b67dbfc8000015", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3456ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5142c6a8b9b67dbfc8000015", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.5477ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"5142c6a8b9b67dbfc8000015", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (12.2778ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51459331b9b67d0aa7000058"}} (1.5237ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51459331b9b67d0aa7000058"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.8276ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51459373b9b67d0aa7000075"}} (1.4677ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51459373b9b67d0aa7000075"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.5422ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51471422b9b67d9f9b000004"}} (1.4527ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51471422b9b67d9f9b000004"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.7503ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"vouchers", :query=>{"deleted_at"=>nil, "booking_id"=>"51471695b9b67d9f9b000030"}} (1.2326ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"vouchers", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.credit_amount,\n min: this.credit_amount,\n sum: this.credit_amount\n };\n emit(\"credit_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "booking_id"=>"51471695b9b67d9f9b000030"}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (3.5372ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5142c6a8b9b67dbfc8000015", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.9752ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.paid_amount,\n min: this.paid_amount,\n sum: this.paid_amount\n };\n emit(\"paid_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"5142c6a8b9b67dbfc8000015", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (7.4444ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"5142c6a8b9b67dbfc8000015", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2240ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:mapreduce=>"bookings", :map=>"\n function() {\n var agg = {\n count: 1,\n max: this.booking_amount,\n min: this.booking_amount,\n sum: this.booking_amount\n };\n emit(\"booking_amount\", agg);\n }", :reduce=>"\n function(key, values) {\n var agg = { count: 0, max: null, min: null, sum: 0 };\n values.forEach(function(val) {\n if (val.max !== null) {\n if (agg.max == null || val.max > agg.max) agg.max = val.max;\n if (agg.min == null || val.max < agg.min) agg.min = val.max;\n agg.sum += val.sum;\n }\n agg.count += val.count;\n });\n return agg;\n }", :query=>{"deleted_at"=>nil, "resource_id"=>"5142c6a8b9b67dbfc8000015", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}, :out=>{:inline=>1}, :finalize=>"\n function(key, agg) {\n agg.avg = agg.sum / agg.count;\n return agg;\n }"} (5.7604ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51431e6cb9b67dc48400000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2435ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51431e6cb9b67dc48400000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.4152ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51431e6cb9b67dc48400000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.2502ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"51431e6cb9b67dc48400000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.1033ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51431e6cb9b67dc48400000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.0697ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51431e6cb9b67dc48400000f", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.8888ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51431e96b9b67dc484000010", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2969ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51431e96b9b67dc484000010", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3086ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51431e96b9b67dc484000010", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.1827ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"51431e96b9b67dc484000010", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.0716ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51431e96b9b67dc484000010", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1205ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51431e96b9b67dc484000010", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2407ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51431eb5b9b67dc484000011", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3158ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51431eb5b9b67dc484000011", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1386ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51431eb5b9b67dc484000011", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.4278ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"51431eb5b9b67dc484000011", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.1369ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51431eb5b9b67dc484000011", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.0263ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51431eb5b9b67dc484000011", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.8804ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51431ed1b9b67dc484000014", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1610ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51431ed1b9b67dc484000014", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2032ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51431ed1b9b67dc484000014", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.1272ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"51431ed1b9b67dc484000014", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.3019ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51431ed1b9b67dc484000014", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1720ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51431ed1b9b67dc484000014", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (1.9698ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51431f1fb9b67d7781000001", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa7eb9b67d3cbf000014", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.2316ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51431f1fb9b67d7781000001", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "unit_size_id"=>"513cfa8bb9b67d3cbf0004e4", "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.1942ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51431f1fb9b67d7781000001", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>true}} (2.0928ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=bookings selector={"deleted_at"=>nil, "resource_id"=>"51431f1fb9b67d7781000001", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false} flags=[] limit=0 skip=0 batch_size=nil fields=nil (2.0494ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51431f1fb9b67d7781000001", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.3389ms)
MOPED: 127.0.0.1:27017 COMMAND database=phalcomm_production command={:count=>"bookings", :query=>{"deleted_at"=>nil, "resource_id"=>"51431f1fb9b67d7781000001", "resource_type"=>"Distributor", "resource_field"=>{"$in"=>[:bookings, nil]}, "created_at"=>{"$gte"=>2013-02-28 18:30:00 UTC, "$lte"=>2013-03-20 18:29:59 UTC}, "project_id"=>"5139f91fb9b67dbe3a000004", "is_cancelled"=>false}} (2.0227ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=projects selector={"deleted_at"=>nil, "status"=>{"$ne"=>"New"}} flags=[] limit=0 skip=0 batch_size=nil fields=nil (0.9265ms)
Rendered reports/_search.html.haml (268.7ms)
Rendered reports/distributor.html.haml within layouts/application (278.7ms)
MOPED: 127.0.0.1:27017 QUERY database=phalcomm_production collection=roles selector={"$query"=>{"_id"=>"5139f184b9b67d8e73000002"}, "$orderby"=>{:_id=>1}} flags=[] limit=-1 skip=0 batch_size=nil fields=nil (0.6323ms)
Rendered shared/_sidebar.html.haml (288.6ms)
Rendered shared/_messages.html.haml (1.6ms)
Completed 200 OK in 4201ms (Views: 850.8ms)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.