mardi 15 avril 2014

Ravendb doesn't return right numbers


Vote count:

0




I have a very simple code that retrieve some data using aggregate functions. There is something weird, when I run the project localhost it returns the correct numbers but when I deploy it on appharbor it always return zeros


here is a snapshot of my code



var document = new DocumentStore
{
ConnectionStringName = "RAVENHQ_CONNECTION_STRING"
};
document.Initialize();
var session = document.OpenSession();
int start = 0;
long x = 0, y = 0, z = 0, l = 0;
while (true)
{
var data = session.Query<DailyStat>().Take(1024).Skip(start).ToList();
if (data.Count == 0)
break;
x += data.Sum(x => x.a);
y += data.Sum(x => x.b);
start += data.Count;
z += data.Sum(x => x.c);
l += data.Sum(x => x.d);
}
x /= 1000;
y /= 1000;
model.x = x.ToString();
model.y = y.ToString();
model.z = z.ToString();
model.l = l.ToString();


when I run the project locally it, raven always return the correct numbers but when I deploy the project on appharbor, the numbers appears as zeros



asked 44 secs ago






Aucun commentaire:

Enregistrer un commentaire