animeic 2 年之前
父節點
當前提交
9a9273c51b
共有 4 個文件被更改,包括 308 次插入18 次删除
  1. 118 16
      boxcost/api/plan.go
  2. 1 1
      boxcost/api/utils.go
  3. 1 1
      boxcost/app.yaml
  4. 188 0
      boxcost/boxcost.log

+ 118 - 16
boxcost/api/plan.go

@@ -5,12 +5,14 @@ import (
 	"box-cost/db/model"
 	"box-cost/db/repo"
 	"box-cost/log"
+	"bytes"
 	"errors"
 	"fmt"
 	"io"
 	"os"
 	"path/filepath"
 	"strings"
+	"sync"
 	"time"
 
 	"github.com/gin-gonic/gin"
@@ -235,6 +237,7 @@ func DownLoadPlanBills(c *gin.Context, apictx *ApiSession) (interface{}, error)
 
 	return nil, nil
 }
+
 func DownLoadPlanBillsPdf(c *gin.Context, apictx *ApiSession) (interface{}, error) {
 	_planId := c.Query("id")
 	planId, err := primitive.ObjectIDFromHex(_planId)
@@ -279,6 +282,8 @@ func DownLoadPlanBillsPdf(c *gin.Context, apictx *ApiSession) (interface{}, erro
 	}
 	// 记录文件数量
 	fileNum := 0
+	var wg sync.WaitGroup
+	c1 := make(chan int)
 	for _, tId := range typeBillIds {
 		productName := ""
 		supplierName := ""
@@ -380,25 +385,67 @@ func DownLoadPlanBillsPdf(c *gin.Context, apictx *ApiSession) (interface{}, erro
 		billExcel.SetIsPdf("true")
 		billExcel.Draws()
 		buf, _ := f.WriteToBuffer()
-		res, err := excelToPdf(buf, apictx.Svc.Conf.PdfApiAddr)
-		if err != nil {
-			fmt.Println(err)
-			log.Error(err)
-			return nil, errors.New("转化pdf失败")
-		}
-		body := res.Body
-		byteData, err := io.ReadAll(body)
-		if err != nil {
-			fmt.Println(err)
-			return nil, err
-		}
+		// res, err := excelToPdf(buf, apictx.Svc.Conf.PdfApiAddr)
+		// if err != nil {
+		// 	fmt.Println(err)
+		// 	log.Error(err)
+		// 	return nil, errors.New("转化pdf失败")
+		// }
+		// body := res.Body
+		// byteData, err := io.ReadAll(body)
+		// if err != nil {
+		// 	fmt.Println(err)
+		// 	return nil, err
+		// }
 		targePdfName := fmt.Sprintf("%s-%s.pdf", productName, supplierName)
-		err = savePdfToTmp(saveTmpDir, targePdfName, byteData)
-		if err != nil {
-			return nil, err
-		}
+		// err = savePdfToTmp(saveTmpDir, targePdfName, byteData)
+		// if err != nil {
+		// 	return nil, err
+		// }
 		fileNum++
+
+		wg.Add(1)
+		// fmt.Println(1)
+
+		go toPdfAndSaveTask(buf, apictx.Svc.Conf.PdfApiAddr, saveTmpDir, targePdfName, c1, &wg)
+
+	}
+	go func() {
+		wg.Wait()
+		close(c1)
+	}()
+	num := 0
+	for n := range c1 {
+		num++
+		fmt.Println(n)
+		if n == -1 {
+			return nil, errors.New("下载失败,请重试")
+		}
 	}
+
+	// wg.Wait()
+	// cnum := 0
+	// for {
+	// 	cnum++
+	// 	result := <-c1
+	// 	if !result.IsSucc {
+
+	// 		return nil, result.Err
+	// 	}
+	// 	fmt.Println("cnum:", cnum)
+	// 	fmt.Println("fileNum:", cnum)
+	// 	if cnum == fileNum {
+	// 		break
+	// 	}
+	// }
+	// select {
+	// case v := <-c1:
+	// 	fmt.Println(v)
+	// 	if !v.IsSucc {
+	// 		return nil, err
+	// 	}
+	// }
+
 	fmt.Println("fileNum: ", fileNum)
 	c.Header("Content-Type", "application/octet-stream")
 	c.Header("Content-Disposition", "attachment; filename="+planName+".zip")
@@ -442,6 +489,61 @@ func DownLoadPlanBillsPdf(c *gin.Context, apictx *ApiSession) (interface{}, erro
 	return nil, nil
 }
 
+type ToPdfResult struct {
+	IsSucc bool
+	Err    error
+}
+
+func toPdfAndSaveTask(buf *bytes.Buffer, toPdfAddr, saveTmpDir, targetPdfName string, toPdfResult chan<- int, wg *sync.WaitGroup) {
+	res, err := excelToPdf(buf, toPdfAddr)
+	if err != nil {
+		fmt.Println(err)
+		log.Error(err)
+		// pdfRes := ToPdfResult{
+		// 	IsSucc: false,
+		// 	Err:    err,
+		// }
+		// toPdfResult <- pdfRes
+		toPdfResult <- -1
+		wg.Done()
+		return
+
+	}
+
+	byteData, err := io.ReadAll(res.Body)
+	if err != nil {
+		fmt.Println(err)
+		// pdfRes := ToPdfResult{
+		// 	IsSucc: false,
+		// 	Err:    err,
+		// }
+		// toPdfResult <- pdfRes
+		toPdfResult <- -1
+		wg.Done()
+		return
+	}
+	defer res.Body.Close()
+
+	err = savePdfToTmp(saveTmpDir, targetPdfName, byteData)
+	if err != nil {
+		// pdfRes := ToPdfResult{
+		// 	IsSucc: false,
+		// 	Err:    err,
+		// }
+		// toPdfResult <- pdfRes
+		toPdfResult <- -1
+		wg.Done()
+		return
+	}
+	// pdfRes := ToPdfResult{
+	// 	IsSucc: true,
+	// 	Err:    err,
+	// }
+	// toPdfResult <- pdfRes
+	toPdfResult <- 1
+	wg.Done()
+}
+
 func DownLoadCompBills(c *gin.Context, apictx *ApiSession) (interface{}, error) {
 	_planId := c.Query("id")
 	compId := c.Query("compId")

+ 1 - 1
boxcost/api/utils.go

@@ -123,7 +123,7 @@ func searchBillTypeById(ctx *ApiSession, collectName string, id primitive.Object
 
 func excelToPdf(formBody *bytes.Buffer, pdfHost string) (*http.Response, error) {
 	httpClient := &http.Client{
-		Timeout: time.Duration(5) * time.Second,
+		Timeout: time.Duration(10) * time.Second,
 	}
 	client := &gotenberg.Client{Hostname: pdfHost, HTTPClient: httpClient}
 	doc, err := gotenberg.NewDocumentFromBytes("foo.xlsx", formBody.Bytes())

+ 1 - 1
boxcost/app.yaml

@@ -2,7 +2,7 @@ port: 8888
 name: boxcost
 version: 1.0.0
 saveType: obs
-pdfApiAddr: "http://localhost:3000"
+pdfApiAddr: "http://localhost:3001"
 
 obs:
   bucket: sku3d-test

+ 188 - 0
boxcost/boxcost.log

@@ -36,3 +36,191 @@
 {"level":"error","timestamp":"2023-03-09 17:43:54","message":"[mkdir ./tmp/addd: permission denied]","service_name":"boxcost"}
 {"level":"error","timestamp":"2023-03-10 09:48:29","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
 {"level":"error","timestamp":"2023-03-10 09:49:12","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:29:10","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:29:10","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:29:10","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:29:10","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:29:10","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:29:10","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:29:10","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:29:10","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:29:10","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:29:10","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:29:11","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:29:11","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:29:11","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:29:11","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:29:11","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:29:11","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:29:11","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:29:11","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:29:11","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:29:11","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:29:11","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:30:00","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:30:00","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:30:00","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:30:00","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:30:00","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:30:00","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:30:00","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:30:00","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:30:00","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:30:01","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:30:01","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:30:01","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:30:01","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:30:01","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:30:01","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:30:01","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 17:30:01","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:12","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:12","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:12","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:12","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:13","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:13","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:13","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:13","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:13","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:13","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:13","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:13","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:13","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:13","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:13","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:13","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:13","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:41","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:41","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:41","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:41","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:41","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:41","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:41","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:41","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:41","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:41","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:41","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:42","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:42","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:42","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:42","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:42","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:42","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:42","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:42","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:42","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:42","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:01:42","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:06:43","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:06:43","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:06:43","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:06:43","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:06:43","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:06:44","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:06:44","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:06:44","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:06:44","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:06:44","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:07:53","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:16:01","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:16:01","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:16:01","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:16:01","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:16:01","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:16:01","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:16:01","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:16:01","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:16:01","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:16:01","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:16:01","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:16:01","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:16:02","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:16:02","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:16:02","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:16:02","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:16:02","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:16:02","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:16:02","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:16:02","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:16:02","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:16:02","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:18:31","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:18:31","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:18:31","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:18:31","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:18:31","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:18:31","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:18:31","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:18:31","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:18:31","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:18:32","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:18:32","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:18:32","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:18:32","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:18:32","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:18:32","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:18:32","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:19:06","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:19:06","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:19:06","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:19:06","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:19:07","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:19:07","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:19:07","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:19:07","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:19:07","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:19:07","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:19:07","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:19:07","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:19:07","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:19:07","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:24:30","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:24:30","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:24:30","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:24:30","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:24:30","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:24:30","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:24:30","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:24:30","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:24:31","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:24:31","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:24:31","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:24:31","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:24:31","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:24:31","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:28:44","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:28:45","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:36:53","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:21","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:21","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:21","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:21","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:21","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:21","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:21","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:21","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:21","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:53","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:54","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:54","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:54","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:54","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:54","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:54","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:54","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:54","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:54","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:54","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:54","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:54","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:54","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:54","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:55","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:55","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:55","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:55","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:55","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:55","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}
+{"level":"error","timestamp":"2023-03-10 18:40:55","message":"[Post \"http://localhost:3001/convert/office\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)]","service_name":"boxcost"}