fix file expiration logic and some bugs.

This commit is contained in:
hogehoge-banana
2015-10-20 00:55:33 +09:00
parent 9299487670
commit 8462290d34
3 changed files with 152 additions and 177 deletions

View File

@@ -755,6 +755,7 @@ program
, profile: options.profile
, Bucket: options.bucket
, endpoint: options.endpoint
, expires: options.expires
})
})
@@ -922,10 +923,18 @@ program
, 'websocket port'
, Number
, 7110)
.option('--storage-type <temp|s3>'
, 'storage type'
, String
, 'temp')
.option('--storage-port <port>'
, 'storage port'
, Number
, 7102)
.option('--storage-options <json>'
, 'array of options to pass to the storage implementation'
, String
, '[]')
.option('--storage-plugin-image-port <port>'
, 'storage image plugin port'
, Number
@@ -972,7 +981,7 @@ program
.option('--use-s3'
, 'use amazon s3')
.option('--s3-bucket <bucketname>'
, 'your bucket name'
, 'your Bucket name'
, String)
.option('--s3-profile <s3profile>'
, 'aws credential Profile name'
@@ -991,7 +1000,7 @@ program
// Each forked process waits for signals to stop, and so we run over the
// default limit of 10. So, it's not a leak, but a refactor wouldn't hurt.
process.setMaxListeners(20)
function run() {
var procs = [
// app triproxy
@@ -1098,22 +1107,11 @@ program
])
// storage
, (function() {
if (!options.useS3) {
return procutil.fork(__filename, [
'storage-temp'
, '--port', options.storagePort
]);
} else {
return procutil.fork(__filename, [
'storage-s3'
, '--port', options.storagePort
, '--bucket', options.s3Bucket
, '--profile', options.s3Profile
, '--endpoint', options.s3Endpoint
])
}
})()
, procutil.fork(__filename, [
util.format('storage-%s', options.storageType)
, '--port', options.storagePort
].concat(JSON.parse(options.storageOptions)))
// image processor
, procutil.fork(__filename, [
'storage-plugin-image'