diff options
| author | Dan Engelbrecht <[email protected]> | 2024-03-15 13:36:34 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2024-03-15 13:36:34 +0100 |
| commit | 56150a9449736934b96738320706ebbea3503735 (patch) | |
| tree | 8e70cab890e2fa761ec662e9bcc0f4c1d871957e | |
| parent | remove vcpkg integrate install from windows setup (diff) | |
| download | zen-56150a9449736934b96738320706ebbea3503735.tar.xz zen-56150a9449736934b96738320706ebbea3503735.zip | |
make sure zenserver reacts and exist on SIGTERM signal (#8)
* make sure zenserver reacts and exist on SIGTERM signal
* add zen tag to all runners
* temp disable mac codesigning
| -rw-r--r-- | .github/workflows/create_release.yml | 11 | ||||
| -rw-r--r-- | .github/workflows/validate.yml | 13 | ||||
| -rw-r--r-- | CHANGELOG.md | 1 | ||||
| -rw-r--r-- | src/zenserver/main.cpp | 1 | ||||
| -rw-r--r-- | src/zenserver/zenserver.cpp | 6 |
5 files changed, 21 insertions, 11 deletions
diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 60ee4983e..0e9584357 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -11,7 +11,7 @@ on: jobs: bundle-windows: - runs-on: [hv, windows, x64] + runs-on: [hv, windows, x64, zen] timeout-minutes: 25 steps: @@ -60,7 +60,7 @@ jobs: path: build/zenserver-win64.zip bundle-linux: - runs-on: [hv, linux, x64] + runs-on: [hv, linux, x64, zen] timeout-minutes: 25 steps: @@ -120,7 +120,7 @@ jobs: path: build/zenserver-linux.zip bundle-macos: - runs-on: [hv, macos, x64] + runs-on: [hv, macos, x64, zen] timeout-minutes: 25 steps: @@ -153,7 +153,8 @@ jobs: - name: Bundle run: | - xmake bundle -v -y --codesignidentity="Developer ID Application" + xmake bundle -v -y +# xmake bundle -v -y --codesignidentity="Developer ID Application" env: VCPKG_ROOT: ${{ github.workspace }}/.vcpkg @@ -179,7 +180,7 @@ jobs: path: build/zenserver-macos.zip create-release: - runs-on: [hv, linux, x64] + runs-on: [hv, linux, x64, zen] timeout-minutes: 5 needs: [bundle-linux, bundle-macos, bundle-windows] diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 5152d8ad0..d2b45bb06 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -21,7 +21,7 @@ on: jobs: cancel-old-build: name: Cancel previous builds - runs-on: [hv, linux, x64] + runs-on: [hv, linux, x64, zen] steps: - name: Cancel Previous Runs @@ -33,7 +33,7 @@ jobs: clang-format: needs: cancel-old-build name: Check clang-format - runs-on: [hv, linux, x64] + runs-on: [hv, linux, x64, zen] steps: - uses: actions/checkout@v3 @@ -47,7 +47,7 @@ jobs: windows-build: needs: cancel-old-build name: Build & Test Windows - runs-on: [hv, windows, x64] + runs-on: [hv, windows, x64, zen] timeout-minutes: 25 strategy: matrix: @@ -110,7 +110,7 @@ jobs: linux-build: needs: cancel-old-build name: Build & Test Linux - runs-on: [hv, linux, x64] + runs-on: [hv, linux, x64, zen] timeout-minutes: 25 strategy: matrix: @@ -178,7 +178,7 @@ jobs: macos-build: needs: cancel-old-build name: Build & Test MacOS - runs-on: [hv, macos, x64] + runs-on: [hv, macos, x64, zen] timeout-minutes: 25 strategy: matrix: @@ -227,7 +227,8 @@ jobs: - name: Bundle if: ${{ matrix.config == 'release' }} run: | - xmake bundle -v -y --codesignidentity="Developer ID Application" + xmake bundle -v -y + # xmake bundle -v -y --codesignidentity="Developer ID Application" env: VCPKG_ROOT: ${{ github.workspace }}/.vcpkg diff --git a/CHANGELOG.md b/CHANGELOG.md index f8d521e7d..79cf0c050 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ - Improvement: Cleaned up some asio server state machine details (minor) - Improvement: Added support for request tracing when using asio path (use `--log-trace=http_requests` to enable) - Improvement: Large attachments and loose files are now split into smaller chunks and stored in blocks during oplog export +- Improvement: Make sure zenserver reacts and exist on SIGTERM signal - Removed: `--cache-reference-cache-enabled` option has been removed along with the implementation for reference caching in disk cache ## 5.4.1 diff --git a/src/zenserver/main.cpp b/src/zenserver/main.cpp index 4a5b98e8e..01e142801 100644 --- a/src/zenserver/main.cpp +++ b/src/zenserver/main.cpp @@ -325,6 +325,7 @@ main(int argc, char* argv[]) } signal(SIGINT, utils::SignalCallbackHandler); + signal(SIGTERM, utils::SignalCallbackHandler); try { diff --git a/src/zenserver/zenserver.cpp b/src/zenserver/zenserver.cpp index 6b0760343..d8176678d 100644 --- a/src/zenserver/zenserver.cpp +++ b/src/zenserver/zenserver.cpp @@ -847,6 +847,12 @@ ZenServer::CheckSigInt() RequestExit(128 + SIGINT); return; } + if (utils::SignalCounter[SIGTERM] > 0) + { + ZEN_INFO("SIGTERM triggered for process {}, exiting", zen::GetCurrentProcessId()); + RequestExit(128 + SIGTERM); + return; + } EnqueueSigIntTimer(); } |