Skip to content

Commit f018710

Browse files
committed
fix: resolve client duration reset bug and workflow issues
- Separate connection start time from last heartbeat tracking - Add client_last_seen dictionary for heartbeat timestamps - Fix register_heartbeat to only update last_seen, preserving connection start time - Update _prune_stale_clients to use last_seen for timeout detection - Fix workflow cache move step to check directory existence - Add workspace cleanup step to fix permission issues
1 parent fc8c123 commit f018710

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/snd.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ jobs:
2323
platform: linux/arm64
2424
platform_tag: arm64
2525
steps:
26+
- name: Clean workspace
27+
if: always()
28+
run: |
29+
sudo chown -R $USER:$USER ${{ github.workspace }} || true
30+
rm -rf ${{ github.workspace }}/* ${{ github.workspace }}/.* 2>/dev/null || true
31+
2632
- name: Checkout repository
2733
uses: actions/checkout@v4
2834
with:
@@ -70,7 +76,9 @@ jobs:
7076
if: always()
7177
run: |
7278
rm -rf ${{ env.CACHE_PATH }}
73-
mv ${{ env.CACHE_PATH_NEW }} ${{ env.CACHE_PATH }}
79+
if [ -d "${{ env.CACHE_PATH_NEW }}" ]; then
80+
mv ${{ env.CACHE_PATH_NEW }} ${{ env.CACHE_PATH }}
81+
fi
7482
7583
merge:
7684
name: Merge Multi-Arch Image
@@ -102,5 +110,3 @@ jobs:
102110
docker pull ${{ vars.DOCKERHUB_USERNAME }}/simpleclouddetect:snd
103111
IMAGE_SIZE=$(docker images --format "{{.Size}}" ${{ vars.DOCKERHUB_USERNAME }}/simpleclouddetect:snd | head -n1)
104112
echo "Docker image size: $IMAGE_SIZE"
105-
106-

0 commit comments

Comments
 (0)