示例#1
0
 def poke(self, context):
     logging.info('Poking for prefix : {self.prefix}\n'
                  'in bucket s3://{self.bucket_name}'.format(**locals()))
     hook = hooks.S3Hook(s3_conn_id=self.s3_conn_id)
     return hook.check_for_prefix(prefix=self.prefix,
                                  delimiter=self.delimiter,
                                  bucket_name=self.bucket_name)
示例#2
0
 def poke(self, context):
     hook = hooks.S3Hook(s3_conn_id=self.s3_conn_id)
     full_url = "s3://" + self.bucket_name + "/" + self.bucket_key
     logging.info('Poking for key : {full_url}'.format(**locals()))
     if self.wildcard_match:
         return hook.check_for_wildcard_key(self.bucket_key,
                                            self.bucket_name)
     else:
         return hook.check_for_key(self.bucket_key, self.bucket_name)
示例#3
0
 def poke(self):
     hook = hooks.S3Hook(s3_conn_id=self.s3_conn_id)
     full_url = "s3://" + self.bucket_name + self.bucket_key
     logging.info('Poking for key : {full_url}'.format(**locals()))
     return hook.check_for_key(self.bucket_key, self.bucket_name)