Added possibility of hiding/showing body for full control in in HTTP requests

This commit is contained in:
frikky
2021-10-18 16:48:12 +02:00
parent 348fcaaf93
commit 6d3824cf6f
6 changed files with 86 additions and 16 deletions
+1 -1
View File
@@ -2555,7 +2555,7 @@ class AppBase:
break
except TypeError as e:
newres = ""
self.logger.info(f"[DEBUG] Got exec error: {errorstring}")
self.logger.info(f"[DEBUG] Got exec error: {e}")
errorstring = f"{e}"
if "got an unexpected keyword argument" in errorstring:
fieldsplit = errorstring.split("'")
+1 -1
View File
@@ -3,7 +3,7 @@
### DEFAULT
NAME=shuffle-app_sdk
VERSION=0.9.25
VERSION=0.9.26
docker rmi docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION --force
docker build . -f Dockerfile -t frikky/shuffle:app_sdk -t frikky/$NAME:$VERSION -t docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION -t ghcr.io/frikky/$NAME:$VERSION -t ghcr.io/frikky/$NAME:nightly
+13 -3
View File
@@ -4050,9 +4050,19 @@ func LoadSpecificApps(resp http.ResponseWriter, request *http.Request) {
if tmpBody.ForceUpdate {
dockercli, err := dockerclient.NewEnvClient()
if err == nil {
_, err := dockercli.ImagePull(ctx, "frikky/shuffle:app_sdk", types.ImagePullOptions{})
if err != nil {
log.Printf("[WARNING] Failed to download apps with the new App SDK: %s", err)
appSdk := os.Getenv("SHUFFLE_APP_SDK_VERSION")
if len(appSdk) == 0 {
_, err := dockercli.ImagePull(ctx, "frikky/shuffle:app_sdk", types.ImagePullOptions{})
if err != nil {
log.Printf("[WARNING] Failed to download new App SDK: %s", err)
}
} else {
_, err := dockercli.ImagePull(ctx, fmt.Sprintf("%s/%s/shuffle-app_sdk:%s", "ghcr.io", "frikky", appSdk), types.ImagePullOptions{})
if err != nil {
log.Printf("[WARNING] Failed to download new App SDK %s: %s", err)
}
}
} else {
log.Printf("[WARNING] Failed to download apps with the new App SDK because of docker cli: %s", err)