fix: update app key
This commit is contained in:
@@ -286,7 +286,7 @@ type MathpixRequest struct {
|
||||
// 高级表格处理,默认false
|
||||
EnableTablesFallback bool `json:"enable_tables_fallback"`
|
||||
// 全角标点,null表示自动判断
|
||||
FullwidthPunctuation *bool `json:"fullwidth_punctuation"`
|
||||
FullwidthPunctuation *bool `json:"fullwidth_punctuation,omitempty"`
|
||||
}
|
||||
|
||||
// MathpixCallback 回调配置
|
||||
@@ -819,3 +819,16 @@ func (s *RecognitionService) processMathpixTask(ctx context.Context, taskID int6
|
||||
isSuccess = true
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *RecognitionService) TestProcessMathpixTask(ctx context.Context, taskID int64) error {
|
||||
task, err := dao.NewRecognitionTaskDao().GetTaskByID(dao.DB.WithContext(ctx), taskID)
|
||||
if err != nil {
|
||||
log.Error(ctx, "func", "TestProcessMathpixTask", "msg", "获取任务失败", "error", err)
|
||||
return err
|
||||
}
|
||||
if task == nil {
|
||||
log.Error(ctx, "func", "TestProcessMathpixTask", "msg", "任务不存在", "task_id", taskID)
|
||||
return err
|
||||
}
|
||||
return s.processMathpixTask(ctx, taskID, task.FileURL)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user