3/4/13

data surgery notes

accounting for items.. I was processing some jobs, but there were some duplicate jobs, and I didn't do a good job of dealing with those, so now I need to do a bit of data surgery...

I have two batches of jobs in a single mongodb. I tagged the second batch with a "batch" field. I want to tag the first batch also.. done

not quite all the items in the first batch are done; there's about 8 remaining. People are working on the second batch, which is large, but I want to prioritize these 8 from the first batch..

..there are actually 5 items that aren't even uploaded, so let's upload those.. done

now to prioritize them, let's do:

db.records.update({batch:"first_batch_name", availableToAnswerAt : 0}, {$set:{availableToAnswerAt : -1}}, {multi:true})

..doing availableToAnswerAt = -1 should push them to the top, since we sort by that when showing people available jobs..

we also need to do it for availableToReviewAt:


db.records.update({batch:"first_batch_name", availableToReviewAt : 0}, {$set:{availableToReviewAt : -1}}, {multi:true})

hm.. I'll probably need to run those queries again, in case someone picks up a task, and returns it, since it will set it's "availableAt" time to 0 instead of -1.. I could hack the code to do this for me, but that would require testing, and it's probably easier to just manually hand-hold this process..

hopefully these items will get done today..

oh..

and I have this same issue for a couple new batches, which I should fix preemptively..

ok, good, I think everything is in order now. probably. I thought it was in order before, but now I really thinks it's in order :)

No comments:

Post a Comment