Skip to content
Snippets Groups Projects
Commit df81d9b9 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Minor fixes

parent 83406952
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,7 @@ import ( ...@@ -7,6 +7,7 @@ import (
"gopkg.in/gographics/imagick.v2/imagick" "gopkg.in/gographics/imagick.v2/imagick"
"fmt" "fmt"
"path/filepath" "path/filepath"
"time"
) )
func returnResult(config *Config, client *redis.Client, result Result) { func returnResult(config *Config, client *redis.Client, result Result) {
...@@ -31,6 +32,7 @@ func processImage(config *Config, client *redis.Client, value string) { ...@@ -31,6 +32,7 @@ func processImage(config *Config, client *redis.Client, value string) {
if err := json.Unmarshal([]byte(value), &image); err != nil { if err := json.Unmarshal([]byte(value), &image); err != nil {
panic(err) panic(err)
} }
fmt.Printf("Received task %s at %d\n", image.Id, time.Now().Unix())
errorChannel := make(chan error) errorChannel := make(chan error)
...@@ -46,6 +48,8 @@ func processImage(config *Config, client *redis.Client, value string) { ...@@ -46,6 +48,8 @@ func processImage(config *Config, client *redis.Client, value string) {
} }
} }
fmt.Printf("Finished task %s at %d\n", image.Id, time.Now().Unix())
if len(errors) != 0 { if len(errors) != 0 {
returnResult(config, client, Result{ returnResult(config, client, Result{
Id: image.Id, Id: image.Id,
......
...@@ -93,6 +93,8 @@ func resize(source string, size Size, quality Quality, target string) error { ...@@ -93,6 +93,8 @@ func resize(source string, size Size, quality Quality, target string) error {
mw.SetSamplingFactors(quality.SamplingFactors) mw.SetSamplingFactors(quality.SamplingFactors)
} }
mw.StripImage()
err = mw.WriteImage(target) err = mw.WriteImage(target)
return err return err
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment