refactor(datasource): remove WeCom document integration and related components

- Deleted WeCom document connector and callback handling code to streamline the datasource management.
- Removed associated localization entries and UI elements related to WeCom integration.
- Updated data source management logic to eliminate references to WeCom, enhancing maintainability and clarity.
- Adjusted error handling and logging to reflect the removal of WeCom-specific functionality.
This commit is contained in:
wizardchen
2026-03-30 19:33:17 +08:00
committed by lyingbug
parent 53bd412cf6
commit 1a340a8374
19 changed files with 36 additions and 1528 deletions
+3 -3
View File
@@ -155,7 +155,7 @@ func (s *Scheduler) triggerSync(dataSourceID string, tenantID uint64) {
DataSourceID: dataSourceID,
TenantID: tenantID,
Status: types.SyncLogStatusRunning,
StartedAt: time.Now(),
StartedAt: time.Now().UTC(),
}
if err := s.syncLogRepo.Create(ctx, syncLog); err != nil {
logger.Errorf(ctx, "[Scheduler] failed to create sync log for ds=%s: %v", dataSourceID, err)
@@ -182,7 +182,7 @@ func (s *Scheduler) triggerSync(dataSourceID string, tenantID uint64) {
if err == asynq.ErrTaskIDConflict {
logger.Infof(ctx, "[Scheduler] sync already enqueued by another instance for ds=%s", dataSourceID)
syncLog.Status = types.SyncLogStatusCanceled
now := time.Now()
now := time.Now().UTC()
syncLog.FinishedAt = &now
syncLog.ErrorMessage = "deduplicated: another instance enqueued first"
_ = s.syncLogRepo.Update(ctx, syncLog)
@@ -190,7 +190,7 @@ func (s *Scheduler) triggerSync(dataSourceID string, tenantID uint64) {
}
logger.Errorf(ctx, "[Scheduler] failed to enqueue sync task for ds=%s: %v", dataSourceID, err)
syncLog.Status = types.SyncLogStatusFailed
now := time.Now()
now := time.Now().UTC()
syncLog.FinishedAt = &now
syncLog.ErrorMessage = fmt.Sprintf("enqueue failed: %v", err)
_ = s.syncLogRepo.Update(ctx, syncLog)