Skip to content

Commit 3fa02f2

Browse files
committed
fix: Partially fix #34
Now we have correct qualification requirements However, each batch (round) checks for different QualificationTypeId's. Will look at this bug later Caveat: I hard-coded a 0 into memo storage to bypass a get of null value error. We might want to delete it from the memo data structure later, because we no longer check for equality with batch_no in qualification requirement.
1 parent 8d80730 commit 3fa02f2

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

libautoman/src/main/scala/org/automanlang/adapters/mturk/logging/MTMemo.scala

+2-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,8 @@ class MTMemo(log_config: LogConfig.Value, database_path: String, in_mem_db: Bool
316316
// something must be present in the ID field, but since it doesn't
317317
// matter what it is, we just use 1; the database subs in the
318318
// appropriate autoincremented ID.
319-
(1, d.getQualificationTypeId, d.getIntegerValues.get(0).toInt, Comparator.fromValue(d.getComparator), d.getActionsGuarded, true, hittype.id)
319+
// TODO: Ye Shu: I'm temporarily changing the number to 0 to prevent error
320+
(1, d.getQualificationTypeId, 0, Comparator.fromValue(d.getComparator), d.getActionsGuarded, true, hittype.id)
320321
}
321322
}
322323

libautoman/src/main/scala/org/automanlang/adapters/mturk/worker/MTurkMethods.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ object MTurkMethods {
123123
DebugLog(s"Creating disqualification ID: ${qual.getQualificationType.getQualificationTypeId}.",LogLevelInfo(),LogType.ADAPTER,null)
124124
new QualificationRequirement()
125125
.withQualificationTypeId(qual.getQualificationType.getQualificationTypeId)
126-
.withComparator(model.Comparator.EqualTo)
127-
.withIntegerValues(batch_no)
126+
.withComparator(model.Comparator.DoesNotExist)
127+
// .withIntegerValues(batch_no)
128128
.withActionsGuarded("Accept") //TODO: Check if this is what we want
129129

130130
//model.Comparator.EqualTo, batch_no, null, false)

0 commit comments

Comments
 (0)