summaryrefslogtreecommitdiff
path: root/aws.go
diff options
context:
space:
mode:
Diffstat (limited to 'aws.go')
-rw-r--r--aws.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/aws.go b/aws.go
index 6e0d7f8..2411c24 100644
--- a/aws.go
+++ b/aws.go
@@ -51,7 +51,6 @@ type AwsConn struct {
downloader *s3manager.Downloader
uploader *s3manager.Uploader
wipequrl, prequrl, ocrpgqurl, analysequrl string
- testqurl string
wipstorageid string
}
@@ -126,15 +125,6 @@ func (a *AwsConn) Init() error {
}
a.analysequrl = *result.QueueUrl
- a.Logger.Println("Getting test queue URL")
- result, err = a.sqssvc.GetQueueUrl(&sqs.GetQueueUrlInput{
- QueueName: aws.String(queueTest),
- })
- if err != nil {
- return errors.New(fmt.Sprintf("Error getting test queue URL: %s", err))
- }
- a.testqurl = *result.QueueUrl
-
return nil
}
@@ -347,7 +337,17 @@ func (a *AwsConn) WIPStorageId() string {
}
func (a *AwsConn) TestQueueId() string {
- return a.testqurl
+ // We don't bother saving the queue id in Init(), as it's only
+ // used for testing
+ a.Logger.Println("Getting test queue URL")
+ result, err := a.sqssvc.GetQueueUrl(&sqs.GetQueueUrlInput{
+ QueueName: aws.String(queueTest),
+ })
+ if err != nil {
+ a.Logger.Printf("Error getting test queue URL: %s\n", err)
+ return ""
+ }
+ return *result.QueueUrl
}
func (a *AwsConn) ListObjects(bucket string, prefix string) ([]string, error) {