aantix / turkee

Blurring the line between Mechanical Turk, Rails and usability testing..
http://github.com/aantix/turkee
MIT License
152 stars 39 forks source link

Status tracking improvements #16

Closed denniskuczynski closed 12 years ago

denniskuczynski commented 12 years ago

I'm trying to build a Web Dashboard on top of turkee that can be used to analyze HIT batches and worker submissions.

To do this, I needed to add some additional columns to turkee_imported_assignments to track the worker_id, turkee_task_id, and result model_id.

I also added in support for specifying HIT duration and modified the hit_complete callback code to work. Updating the corresponding documentation in the Readme.

Let me know what you think, Thanks, Dennis

aantix commented 12 years ago

What's the difference between your added duration field and the existing lifetime field?

denniskuczynski commented 12 years ago

Duration is how long a Turk can hold onto a HIT once they accept it. Lifetime determines when the HIT expires overall.

aantix commented 12 years ago

Thanks for the additions. A few items:

1) I think duration should be optional as I don't want to change the existing interface.

2) I didn't see any code in there that modified the hit_complete callback; did I miss something?

denniskuczynski commented 12 years ago

@aantix Thanks. I've updated the Task and the create_hit method to make duration optional. (Sorry about the sublime text files, I just switched editors and didn't notice them.)

For 2) The model class was never being added to the models array, so I added "models << model".

aantix commented 12 years ago

Merged in. It may be a while before I do an official gem release though.

Thanks for the contribution!

aantix commented 12 years ago

Just was working with the new changes; adding that duration param after lifetime param is probably going to screw a few users since they'll assume that the interface on the gem stays the same. Since there's an additional parameter in the middle, that made one of my options hashes shift (so I was essentially getting nil later on when checking for the form_url key).

Might have to do some additional checking there, or remove the nil default, so that the end users know that the interface has changed.

denniskuczynski commented 12 years ago

Right. I can submit a pull request if you want. Maybe it's best just to take out the default nil from duration and point it out in the docs. (The additional checking would be to log a warning or throw an exception if duration comes in as a Hash?)