diff options
| author | Nick White <git@njw.name> | 2022-02-28 16:17:35 +0000 | 
|---|---|---|
| committer | Nick White <git@njw.name> | 2022-02-28 16:17:35 +0000 | 
| commit | 21d49b546a27de6c53d8fe7d1a68d5a3b5506c93 (patch) | |
| tree | 729663de5863c125fad24d37df5147c2569771d1 /aws.go | |
| parent | 54aca8994863f5c58bce0224bc943b81c60f5d04 (diff) | |
Add PreNoWipe queue, that just does binarisation but no wiping
Diffstat (limited to 'aws.go')
| -rw-r--r-- | aws.go | 16 | 
1 files changed, 15 insertions, 1 deletions
| @@ -52,6 +52,7 @@ type AwsConn struct {  	uploader     *s3manager.Uploader  	wipequrl     string  	prequrl      string +	prenwqurl    string  	ocrpgqurl    string  	analysequrl  string  	testqurl     string @@ -102,6 +103,15 @@ func (a *AwsConn) Init() error {  	}  	a.prequrl = *result.QueueUrl +	a.Logger.Println("Getting preprocess no wipe queue URL") +	result, err = a.sqssvc.GetQueueUrl(&sqs.GetQueueUrlInput{ +		QueueName: aws.String(queuePreNoWipe), +	}) +	if err != nil { +		return errors.New(fmt.Sprintf("Error getting preprocess no wipe queue URL: %s", err)) +	} +	a.prenwqurl = *result.QueueUrl +  	a.Logger.Println("Getting wipeonly queue URL")  	result, err = a.sqssvc.GetQueueUrl(&sqs.GetQueueUrlInput{  		QueueName: aws.String(queueWipeOnly), @@ -337,6 +347,10 @@ func (a *AwsConn) PreQueueId() string {  	return a.prequrl  } +func (a *AwsConn) PreNoWipeQueueId() string { +	return a.prenwqurl +} +  func (a *AwsConn) WipeQueueId() string {  	return a.wipequrl  } @@ -616,7 +630,7 @@ func (a *AwsConn) Log(v ...interface{}) {  // TODO: also set up the necessary security group and iam stuff  func (a *AwsConn) MkPipeline() error {  	buckets := []string{storageWip} -	queues := []string{queuePreProc, queueWipeOnly, queueAnalyse, queueOcrPage, queueTest} +	queues := []string{queuePreProc, queuePreNoWipe, queueWipeOnly, queueAnalyse, queueOcrPage, queueTest}  	for _, bucket := range buckets {  		err := a.CreateBucket(bucket) | 
