Small repairs on logic
This commit is contained in:
@@ -8,7 +8,9 @@ func NewTorrentState(initial string) *fsm.FSM {
|
||||
return fsm.NewFSM(
|
||||
initial,
|
||||
fsm.Events{
|
||||
// when enqueueing a torrent for repair
|
||||
{Name: "break_torrent", Src: []string{"ok_torrent"}, Dst: "broken_torrent"},
|
||||
// when repair has been started
|
||||
{Name: "repair_torrent", Src: []string{"ok_torrent", "broken_torrent"}, Dst: "under_repair_torrent"},
|
||||
{Name: "mark_as_repaired", Src: []string{"broken_torrent", "under_repair_torrent"}, Dst: "ok_torrent"},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user