mirror of
https://github.com/tuna/tunasync.git
synced 2025-04-20 11:42:43 +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…
x
Reference in New Issue
Block a user