chore: minor refactor of gotenberg pkg

This commit is contained in:
Julien Neuhart
2023-11-20 22:10:18 +01:00
parent 793e65bac0
commit b56cde47ca
10 changed files with 554 additions and 442 deletions

View File

@@ -29,7 +29,7 @@ type libreOfficeArguments struct {
type libreOfficeProcess struct {
socketPort int
userProfileDirPath string
cmd gotenberg.Cmd
cmd *gotenberg.Cmd
cfgMu sync.RWMutex
isStarted atomic.Bool
@@ -213,7 +213,7 @@ func (p *libreOfficeProcess) Stop(logger *zap.Logger) error {
p.socketPort = 0
p.userProfileDirPath = ""
p.cmd = gotenberg.Cmd{} // FIXME: pointer.
p.cmd = nil
p.isStarted.Store(false)
return nil