From cdf3e9cdb3d479208863e38510282baf9acfe86a Mon Sep 17 00:00:00 2001 From: Monet Lee Date: Tue, 3 Jun 2025 16:49:47 +0800 Subject: [PATCH] remove comment. --- internal/tools/cron/dist_look.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/internal/tools/cron/dist_look.go b/internal/tools/cron/dist_look.go index 9edfbc794..2bcf7f951 100644 --- a/internal/tools/cron/dist_look.go +++ b/internal/tools/cron/dist_look.go @@ -144,14 +144,12 @@ func (e *EtcdLocker) runKeepAlive(ctx context.Context) { } } -// Watch lock status directly in etcd func (e *EtcdLocker) watchLock(ctx context.Context) { log.ZInfo(ctx, "Starting to watch lock status", "instanceID", e.instanceID) watchCtx, cancel := context.WithCancel(ctx) e.watchCancel = cancel defer e.cancelWatch() - // Watch for changes to the lock key e.watchCh = e.client.Watch(watchCtx, lockKey) for { select { @@ -174,7 +172,6 @@ func (e *EtcdLocker) watchLock(ctx context.Context) { } } -// Release the lock func (e *EtcdLocker) releaseLock(ctx context.Context) { if atomic.LoadInt32(&e.isLockOwner) == 0 { return