mirror of
https://github.com/tuna/tunasync.git
synced 2025-12-25 22:02:46 +00:00
Fix DeleteWorker behavior to match tests
This commit is contained in:
parent
7dd61ae8ca
commit
90b4e5debb
|
|
@ -121,6 +121,10 @@ func (b *kvDBAdapter) GetWorker(workerID string) (w WorkerStatus, err error) {
|
|||
}
|
||||
|
||||
func (b *kvDBAdapter) DeleteWorker(workerID string) error {
|
||||
v, _ := b.db.Get(_workerBucketKey, workerID)
|
||||
if v == nil {
|
||||
return fmt.Errorf("invalid workerID %s", workerID)
|
||||
}
|
||||
return b.db.Delete(_workerBucketKey, workerID)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue