Program 1: /usr/local/bin/mturk-hit-monitor
This is run from cron once every minute.
select hit_id from mturk_job_details on image_id
where not(ready_for_collection) and not(collected)
and calls GetHit in random order for each hit that it finds there. To
stop the problem of a cascade of mturk-hit-monitors running, if is
about to call GetHit but it is now more than 59 seconds since the
program started, it quits instead.
If GetHit says that an assignment has been completed by all workers
- sets ready_for_collection = true
- set when_ready_for_collection = timenow
- triggers a postgresql "NOTIFY collection_ready, $hit_id"
- spawns /usr/local/bin/collect-results -g $hit_id
Program 2: /usr/local/bin/collect-results -g $hit_id
If passed the "-a" argument, it acts like it has been invoked with "-g ..." for every record in mturk_job_details
where ready_for_collection = true and collected = false.
When passed with the "-g ..." option:
- Starts a SQL transaction
- It checks to make sure that mturk_job_details.ready_for_collection is true and collected = false where hit_id = $hit_id
- It looks up which image_id this corresponds, running a
"select image_id from mturk_job_details where ... for update skip locked"
- Calls ListAssignmentsForHit and GetAssignment to get the mturk workers' answers and puts them into the table human_reported_mirror_positions, or if the response was "nothing to label" into human_reported_mirrorless_images
- Note that the positions that the human beings report need to be multiplied by the scale_factor from the mturk_job_details page.
e.g. if the human reports (35,25) for the top left hand corner and scale_factor=2 for the job, then what gets stored in human_reported_mirror_positions is top_edge=70, left_edge=50.
- Sets collected = true
- Sets when_collected = timenow
- updates the images_received table setting worker_answers_fetched = true and works_answers_fetch_timestamp = timenow
- commits the transaction
- triggers a postgresql "NOTIFY collection_complete, $image_id"
- spawns /usr/local/bin/calculate-consensus -i $image_id
13 freelancer đang chào giá trung bình $777 cho công việc này
Hello, I have experience in working with Posgres and Linux. I can do your work in Go language, let me know if you are interested in continuing with me Thank you
Hello, I read carefully about your project. I want to know how you can test the result. I am an expert in golang and linux. I hope to discuss more detail with you by chatting. Best regards.
hello I can do these 2 programs for you, also tell you that I can use ORM in database issues with postgres or make complete queries, I would like to work for you, greetings