Merge branch 'master' of github.com:tus/tusd
This commit is contained in:
commit
e4017ff47e
|
@ -1,9 +1,5 @@
|
|||
tusd/data
|
||||
cover.out
|
||||
data/
|
||||
.infra/env.*
|
||||
.infra/ssh/tusd.pem
|
||||
.infra/Frey-residu*
|
||||
.infra/ssh/frey-tusd.pem
|
||||
node_modules/
|
||||
.DS_Store
|
||||
|
|
|
@ -32,7 +32,7 @@ spec:
|
|||
containers:
|
||||
- image: docker.io/tusproject/tusd:latest
|
||||
imagePullPolicy: Always
|
||||
args: ["-port=8080","-behind-proxy","-max-size=1000000000"]
|
||||
args: ["-port=8080","-behind-proxy","-max-size=20000000000"]
|
||||
name: tusd
|
||||
resources:
|
||||
limits:
|
||||
|
|
|
@ -12,7 +12,6 @@ cache:
|
|||
apt: true
|
||||
directories:
|
||||
- $HOME/.gimme
|
||||
- $HOME/.frey
|
||||
- "$HOME/google-cloud-sdk/"
|
||||
env:
|
||||
global:
|
||||
|
@ -33,7 +32,7 @@ before_deploy:
|
|||
- gcloud --quiet version
|
||||
- gcloud --quiet components update
|
||||
- gcloud --quiet components update kubectl
|
||||
- curl https://raw.githubusercontent.com/kubernetes/helm/8478fb4fc723885b155c924d1c8c410b7a9444e6/scripts/get | bash
|
||||
- curl https://raw.githubusercontent.com/kubernetes/helm/9476fcc10aaaf4bbcbeb6b7b9e62e9f03d312697/scripts/get | bash
|
||||
deploy:
|
||||
- provider: releases
|
||||
api_key:
|
||||
|
|
|
@ -70,16 +70,16 @@ func invokeHook(typ HookType, info tusd.FileInfo) {
|
|||
func invokeHookSync(typ HookType, info tusd.FileInfo, captureOutput bool) ([]byte, error) {
|
||||
switch typ {
|
||||
case HookPostFinish:
|
||||
logEv("UploadFinished", "id", info.ID, "size", strconv.FormatInt(info.Size, 10))
|
||||
logEv(stdout, "UploadFinished", "id", info.ID, "size", strconv.FormatInt(info.Size, 10))
|
||||
case HookPostTerminate:
|
||||
logEv("UploadTerminated", "id", info.ID)
|
||||
logEv(stdout, "UploadTerminated", "id", info.ID)
|
||||
}
|
||||
|
||||
if !Flags.FileHooksInstalled && !Flags.HttpHooksInstalled {
|
||||
return nil, nil
|
||||
}
|
||||
name := string(typ)
|
||||
logEv("HookInvocationStart", "type", name, "id", info.ID)
|
||||
logEv(stdout, "HookInvocationStart", "type", name, "id", info.ID)
|
||||
|
||||
output := []byte{}
|
||||
err := error(nil)
|
||||
|
@ -93,9 +93,9 @@ func invokeHookSync(typ HookType, info tusd.FileInfo, captureOutput bool) ([]byt
|
|||
}
|
||||
|
||||
if err != nil {
|
||||
logEv("HookInvocationError", "type", string(typ), "id", info.ID, "error", err.Error())
|
||||
logEv(stderr, "HookInvocationError", "type", string(typ), "id", info.ID, "error", err.Error())
|
||||
} else {
|
||||
logEv("HookInvocationFinish", "type", string(typ), "id", info.ID)
|
||||
logEv(stdout, "HookInvocationFinish", "type", string(typ), "id", info.ID)
|
||||
}
|
||||
|
||||
return output, err
|
||||
|
|
|
@ -10,6 +10,6 @@ import (
|
|||
var stdout = log.New(os.Stdout, "[tusd] ", 0)
|
||||
var stderr = log.New(os.Stderr, "[tusd] ", 0)
|
||||
|
||||
func logEv(eventName string, details ...string) {
|
||||
tusd.LogEvent(stderr, eventName, details...)
|
||||
func logEv(logOutput *log.Logger, eventName string, details ...string) {
|
||||
tusd.LogEvent(logOutput, eventName, details...)
|
||||
}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "."
|
||||
}
|
||||
],
|
||||
"settings": {}
|
||||
}
|
Loading…
Reference in New Issue