in src/bulk-loader/batch-handler/lib/importhistory.py [0:0]
def qualifies_for_processing(self, user_id:str, task:BatchTask)->bool:
'''
Checks if the task requires RIV processing.
:param user_id: The desired user identity.
:param task: The current Amazon S3 Batch Task.
'''
assert user_id is not None, "No user_id is available"
assert task is not None, "No task is available"
'''
Get the Object TagSet with case for this object
'''
response = self.s3.get_object_tagging(
Bucket=task.bucket_name,
Key=task.s3Key)
'''
Enumerate through tags and attempt to disqualify processing
'''
for tag in response['TagSet']:
key = str(tag['Key']).lower()
value = str(tag['Value']).lower()
if 'indexed' == key and value == 'true':
return False
if 'ignore' == key and value == 'true':
return False
return True