summaryrefslogtreecommitdiff
path: root/aws.go
diff options
context:
space:
mode:
authorNick White <git@njw.name>2021-08-02 10:45:53 +0100
committerNick White <git@njw.name>2021-08-02 10:45:53 +0100
commit4b7a4bd1b87d1dbba283e577aa03ce7e390d85d8 (patch)
treee5e7e55763cfbfd74e651a4ba5bea5b7394a93a9 /aws.go
parent5310a5e77e945debdc7bd6f149ba87fab13902db (diff)
internal/pipeline: Add test (incomplete but working) for UploadImages
Diffstat (limited to 'aws.go')
-rw-r--r--aws.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/aws.go b/aws.go
index 21a215c..8e9410f 100644
--- a/aws.go
+++ b/aws.go
@@ -52,6 +52,7 @@ type AwsConn struct {
uploader *s3manager.Uploader
wipequrl, prequrl, ocrpgqurl, analysequrl string
testqurl string
+ teststorageid string
wipstorageid string
}
@@ -139,6 +140,7 @@ func (a *AwsConn) TestInit() error {
return errors.New(fmt.Sprintf("Error getting test queue URL: %s\n", err))
}
a.testqurl = *result.QueueUrl
+ a.teststorageid = storageTest
return nil
}
@@ -346,6 +348,10 @@ func (a *AwsConn) AnalyseQueueId() string {
return a.analysequrl
}
+func (a *AwsConn) TestStorageId() string {
+ return a.teststorageid
+}
+
func (a *AwsConn) WIPStorageId() string {
return a.wipstorageid
}
@@ -612,7 +618,7 @@ func (a *AwsConn) Log(v ...interface{}) {
// mkpipeline sets up necessary buckets and queues for the pipeline
// TODO: also set up the necessary security group and iam stuff
func (a *AwsConn) MkPipeline() error {
- buckets := []string{storageWip}
+ buckets := []string{storageTest, storageWip}
queues := []string{queuePreProc, queueWipeOnly, queueAnalyse, queueOcrPage, queueTest}
for _, bucket := range buckets {