Skip to content

Commit

Permalink
chore: legacy commands
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcStdt committed Jul 21, 2024
1 parent cda71a4 commit 0bfad15
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion internal/core/services/queue_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package services

import (
"fmt"
"strings"
"sync"

"github.com/highcard-dev/daemon/internal/core/domain"
Expand Down Expand Up @@ -129,8 +130,25 @@ func (sc *QueueManager) QueueLockFile() error {
if err != nil {
return err
}

for cmd, status := range lock.Statuses {

//convert legacy command names
_, err := sc.scrollService.GetCommand(cmd)
if err != nil {

parts := strings.Split(cmd, ".")
if len(parts) > 1 {
cmd = parts[1]
} else {
return err
}

_, err = sc.scrollService.GetCommand(cmd)
if err != nil {
return err
}
}

sc.commandQueue[cmd] = &QueueItem{
status: status,
changeStatus: true,
Expand Down

0 comments on commit 0bfad15

Please sign in to comment.