mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-16 04:12:16 +01:00
fixes waitTimeout, waitDelay not working with float
This commit is contained in:
@@ -3,9 +3,9 @@ package printer
|
||||
import (
|
||||
"context"
|
||||
"os/exec"
|
||||
"time"
|
||||
|
||||
"github.com/thecodingmachine/gotenberg/internal/pkg/standarderror"
|
||||
"github.com/thecodingmachine/gotenberg/internal/pkg/timeout"
|
||||
)
|
||||
|
||||
type merge struct {
|
||||
@@ -31,8 +31,7 @@ func NewMerge(fpaths []string, opts *MergeOptions) Printer {
|
||||
func (p *merge) Print(destination string) error {
|
||||
const op = "printer.merge.Print"
|
||||
if p.ctx == nil {
|
||||
// FIXME duration not working with float
|
||||
ctx, cancel := context.WithTimeout(context.Background(), time.Duration(p.opts.WaitTimeout)*time.Second)
|
||||
ctx, cancel := timeout.Context(p.opts.WaitTimeout)
|
||||
defer cancel()
|
||||
p.ctx = ctx
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user