Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hirokidaichi/resizing-worker
an implementation of jpeg resize for s3 and sqs user
https://github.com/hirokidaichi/resizing-worker
Last synced: 7 days ago
JSON representation
an implementation of jpeg resize for s3 and sqs user
- Host: GitHub
- URL: https://github.com/hirokidaichi/resizing-worker
- Owner: hirokidaichi
- Created: 2014-11-03T18:45:32.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-14T19:39:34.000Z (almost 10 years ago)
- Last Synced: 2024-04-20T19:51:50.871Z (7 months ago)
- Language: Go
- Size: 188 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# resizing-worker
an implementation of jpeg resize worker for sqs and s3# how to install
```
go get github.com/hirokidaichi/resizing-worker
```# usage
```
usage: resizing-workerthe commands are:
httpserver Work as HTTP server and receive JSON messages and process it
watcher Watch SQS queues and retrieve messages and process it
```# use as a container
```
docker pull hirokidaichi/resizing-worker
``````
docker run -t ¥
-e "AWS_ACCESS_KEY_ID=YOUR_ACEESS_KEY" ¥
-e "AWS_SECRET_KEY=YOUR_SECRET_KEY" ¥
-e "AWS_REGION=REGION" ¥
hirokidaichi/resizing-worker
```# setting.json
```
{
"aws.key": "YOUR KEY",
"aws.secret": "YOUR SECRET",
"aws.region": "ap-northeast-1",
"sqs.queues": ["thumbnail"],
"sqs.polling": "5s",
"workers": 10
}
``````
{
"aws.key": "YOUR KEY",
"aws.secret": "YOUR SECRET",
"aws.region": "ap-northeast-1",
"port" : 8080
}```
# sqs message format
```
{
"from" : {
"bucket" : "bucket-name",
"key" : "image.name.jpg"
},
"to" : {
"bucket" : "bucket-name",
"key" : "image.name.128x128.jpg"
},
"method" : "Bicubic",
"width" : 128,
"height" : 128
}
```