Exemplo n.º 1
0
 def _cleanUpExternalStore(url):
     from toil.jobStores.aws.jobStore import AWSJobStore
     try:
         bucket, _ = AWSJobStore._extractKeyInfoFromUrl(urlparse.urlparse(url))
     except boto.exception.S3ResponseError as ex:
         assert ex.error_code == 404
     else:
         s3 = boto.connect_s3()
         for key in bucket.list():
             key.delete()
         s3.delete_bucket(bucket)
Exemplo n.º 2
0
 def _cleanUpExternalStore(url):
     from toil.jobStores.aws.jobStore import AWSJobStore
     import boto
     try:
         bucket, _ = AWSJobStore._extractKeyInfoFromUrl(
             urlparse.urlparse(url))
     except boto.exception.S3ResponseError as ex:
         assert ex.error_code == 404
     else:
         s3 = boto.connect_s3()
         for key in bucket.list():
             key.delete()
         s3.delete_bucket(bucket)
Exemplo n.º 3
0
 def _hashUrl(url):
     from toil.jobStores.aws.jobStore import AWSJobStore
     bucket, key = AWSJobStore._extractKeyInfoFromUrl(urlparse.urlparse(url), existing=True)
     return hashlib.md5(key.get_contents_as_string()).hexdigest()
Exemplo n.º 4
0
 def _hashUrl(url):
     from toil.jobStores.aws.jobStore import AWSJobStore
     bucket, key = AWSJobStore._extractKeyInfoFromUrl(
         urlparse.urlparse(url), existing=True)
     return hashlib.md5(key.get_contents_as_string()).hexdigest()