mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-14 11:22:15 +01:00
adding new attribute lock (#8)
This commit is contained in:
@@ -33,8 +33,12 @@ func (e *commandTimeoutError) Error() string {
|
||||
// run runs the given command. If timeout is reached or
|
||||
// something bad happened, returns an error.
|
||||
func (r *runner) run(command string, interpreter []string, timeout int) error {
|
||||
r.mu.Lock()
|
||||
defer r.mu.Unlock()
|
||||
if config.HasLock() {
|
||||
r.mu.Lock()
|
||||
defer r.mu.Unlock()
|
||||
} else {
|
||||
logger.Warn("lock disabled")
|
||||
}
|
||||
|
||||
binary := interpreter[0]
|
||||
parameters := append(interpreter[1:], command)
|
||||
|
||||
Reference in New Issue
Block a user