# If this is git tag, use the tag name as a docker tag
elif [[ $GITHUB_REF == refs/tags/* ]]; then
- VERSION=${GITHUB_REF}
+ VERSION=${GITHUB_REF#refs/tags/}
fi
TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:${SHORTREF}"
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- - name: Cache Docker layers
- uses: actions/cache@v2
- with:
- path: /tmp/.buildx-cache
- key: ${{ runner.os }}-buildx-${{ github.sha }}
- restore-keys: |
- ${{ runner.os }}-buildx-
-
- name: Build
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile
- platforms: linux/amd64,linux/arm/v7,linux/arm/v6,linux/arm64
+ platforms: linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: ${{ steps.prep.outputs.tags }}
- cache-from: type=local,src=/tmp/.buildx-cache
- cache-to: type=local,dest=/tmp/.buildx-cache
\ No newline at end of file
| tar -xjf - -C /tmp \
&& cd /tmp/jemalloc-${JEMALLOC_VERSION} \
&& ./configure \
+ && NB_CORES=$(grep -c '^processor' /proc/cpuinfo) \
+ && export MAKEFLAGS="-j$((NB_CORES+1)) -l${NB_CORES}" \
&& make \
&& make install
player_id,
)
# run garbage collect manually to avoid too much memory fragmentation
- gc.collect()
+ self.mass.add_job(gc.collect)
# end of queue reached, pass last fadeout bits to final output
yield last_fadeout_data
del last_fadeout_data
# END OF QUEUE STREAM
# run garbage collect manually to avoid too much memory fragmentation
- gc.collect()
+ self.mass.add_job(gc.collect)
LOGGER.info("streaming of queue for player %s completed", player_id)
async def async_stream_queue_item(
async def async_index(self, request: web.Request):
"""Get the index page, redirect if we do not have a web directory."""
# pylint: disable=unused-argument
- if not self.mass.config.stored_config["initialized"]:
- return web.FileResponse(
- os.path.join(os.path.dirname(os.path.abspath(__file__)), "setup.html")
- )
html_app = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "static/index.html"
)