[PR #791] [MERGED] 处理panic避免影响到其它工作流 #1041

Closed
opened 2026-03-03 01:07:24 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/certimate-go/certimate/pull/791
Author: @usual2970
Created: 6/13/2025
Status: Merged
Merged: 6/14/2025
Merged by: @fudiwei

Base: mainHead: feat/panic_recover


📝 Commits (1)

📊 Changes

1 file changed (+21 additions, -1 deletions)

View changed files

📝 internal/workflow/dispatcher/dispatcher.go (+21 -1)

📄 Description

问题

  1. 当前工作流运行触发panic,会导致程序重启。
  2. 从而导致其它定时工作流没有运行完或错过运行时机。

解决方案

  1. 捕获panic。
  2. 打印错误日志到std方便后续排查。
  3. 同时释放信号量避免其它工作流获取不到信号量。

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/certimate-go/certimate/pull/791 **Author:** [@usual2970](https://github.com/usual2970) **Created:** 6/13/2025 **Status:** ✅ Merged **Merged:** 6/14/2025 **Merged by:** [@fudiwei](https://github.com/fudiwei) **Base:** `main` ← **Head:** `feat/panic_recover` --- ### 📝 Commits (1) - [`081e83e`](https://github.com/certimate-go/certimate/commit/081e83e0bf2776a868afc45c21f398609af3e784) recover from panics ### 📊 Changes **1 file changed** (+21 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `internal/workflow/dispatcher/dispatcher.go` (+21 -1) </details> ### 📄 Description # 问题 1. 当前工作流运行触发panic,会导致程序重启。 2. 从而导致其它定时工作流没有运行完或错过运行时机。 # 解决方案 1. 捕获panic。 2. 打印错误日志到std方便后续排查。 3. 同时释放信号量避免其它工作流获取不到信号量。 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 01:07:24 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/certimate#1041
No description provided.