summaryrefslogtreecommitdiff
path: root/workers.go
diff options
context:
space:
mode:
authorGrailFinder <wohilas@gmail.com>2023-02-25 15:02:37 +0300
committerGrailFinder <wohilas@gmail.com>2023-02-25 15:02:37 +0300
commitf60be7df2d741b73863df63c8a275d1b9471db58 (patch)
tree20d7b0e0bd90ba42192feb443d3d9ac1da4904cd /workers.go
parent1ec6ff8ec85ea4597b4897f1d2f1a89ec5e1abb1 (diff)
Feat: add simple slice functionality
Diffstat (limited to 'workers.go')
-rw-r--r--workers.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/workers.go b/workers.go
index 03c9072..91f9eaf 100644
--- a/workers.go
+++ b/workers.go
@@ -9,7 +9,6 @@ func worker(queue chan *Utterance, done chan bool, worknumber int, geshaft chan
return
}
select {
-
case ut := <-queue:
if err := cutoutClipAndTranscode(ut); err == nil {
geshaft <- ut
@@ -21,3 +20,14 @@ func worker(queue chan *Utterance, done chan bool, worknumber int, geshaft chan
}
}
}
+
+func cutterQueue(fQueue chan string, workerID int) {
+ for {
+ if len(fQueue) == 0 {
+ fmt.Println("empty queue, number", workerID)
+ return
+ }
+ fpath := <-fQueue
+ cutOnEqualParts(fpath, segmentSize)
+ }
+}