Forráskód Böngészése

【维护】清理失效的备份工作流与注释代码

Merge pull request #2 from xidongbot/chore/remove-dead-code
PJ568 2 hónapja
szülő
commit
a1325c46ec
2 módosított fájl, 0 hozzáadás és 56 törlés
  1. 0 46
      .github/workflows/docker.yml.bak
  2. 0 10
      src/server.rs

+ 0 - 46
.github/workflows/docker.yml.bak

@@ -1,46 +0,0 @@
-name: Docker
-
-on:
-  push:
-    tags:
-      - 'v*'
-  workflow_dispatch:
-
-jobs:
-  docker:
-    runs-on: ubuntu-latest
-    steps:
-      - name: Checkout
-        uses: actions/checkout@v4
-
-      - name: Set up Docker Buildx
-        uses: docker/setup-buildx-action@v3
-
-      - name: Login to Docker Hub
-        if: github.event_name != 'pull_request'
-        uses: docker/login-action@v3
-        with:
-          username: ${{ secrets.DOCKER_USERNAME }}
-          password: ${{ secrets.DOCKER_PASSWORD }}
-
-      - name: Extract metadata
-        id: meta
-        uses: docker/metadata-action@v5
-        with:
-          images: your-username/swb-sys-monitor
-          tags: |
-            type=ref,event=branch
-            type=ref,event=pr
-            type=semver,pattern={{version}}
-            type=semver,pattern={{major}}.{{minor}}
-
-      - name: Build and push
-        uses: docker/build-push-action@v5
-        with:
-          context: .
-          platforms: linux/amd64,linux/arm64
-          push: ${{ github.event_name != 'pull_request' }}
-          tags: ${{ steps.meta.outputs.tags }}
-          labels: ${{ steps.meta.outputs.labels }}
-          cache-from: type=gha
-          cache-to: type=gha,mode=max

+ 0 - 10
src/server.rs

@@ -14,16 +14,6 @@ pub struct StatusServer {
 }
 
 impl StatusServer {
-    // 该函数已被 new_with_ttl 函数替代
-    // /// 创建新的状态服务器实例
-    // #[inline]
-    // pub fn new(cache: CacheRef) -> Self {
-    //     Self {
-    //         cache,
-    //         cache_ttl_seconds: 10, // 默认值,实际应该通过配置设置
-    //     }
-    // }
-
     /// 创建新的状态服务器实例,带 TTL 配置
     #[inline]
     pub fn new_with_ttl(cache: CacheRef, cache_ttl_seconds: u64) -> Self {