Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
kaki-admin committed Nov 15, 2024
1 parent a52c163 commit acb5ac4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion backend-server/crawler/entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,14 @@ func notionFetchByheadless(websiteURL string) string {

ctx, cancel := chromedp.NewContext(
context.Background(),
chromedp.WithDebugf(log.Printf),
chromedp.WithLogf(log.Printf),
chromedp.WithErrorf(log.Printf),
)
defer cancel()

headlessSer := os.Getenv("HEADLESS_SERVER_URL")
ctx, cancel = context.WithTimeout(ctx, 60*time.Second)
ctx, cancel = context.WithTimeout(ctx, 90*time.Second)
defer cancel()

if headlessSer != "" {
Expand Down
2 changes: 1 addition & 1 deletion backend-server/service/syncdiscovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func SyncDiscoveryFeedPackage(store *storage.Storage) {
saveData, _ := store.GetDiscoveryFeedPackage()
if saveData == nil || saveData.MD5 != packages[0].MD5 {
loadErr := syncDiscoveryFeedloadPackage(store, packages[0])
if loadErr != nil {
if loadErr == nil {
store.SaveDiscoveryFeedPackage(*packages[0])
}

Expand Down
2 changes: 1 addition & 1 deletion system-workflow/sync/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ func doSyncTask() {

//syncFeed(postgresClient, redisClient, provider)
syncErr := syncEntry(redisClient, provider, lastSyncTime)
if syncErr != nil {
if syncErr == nil {
api.SetRedisConfig(key, "last_sync_time", startTimestamp)
}
}
Expand Down

0 comments on commit acb5ac4

Please sign in to comment.