Skip to content

Commit 6589637

Browse files
committed
Reduce retry time for checking api
1 parent 9a74467 commit 6589637

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/services/revalidate.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ export default class RevalidateService {
1919
let revalidateUrl: string
2020

2121
if (id === '/' || id === '/activity') {
22-
revalidateUrl = `${url}revalidate?secret=${this.REVALIDATE_SECRET}&path=${id}`
22+
return
2323
} else {
24-
revalidateUrl = `${url}/revalidate?secret=${this.REVALIDATE_SECRET}&path=/wiki/${id}`
24+
revalidateUrl = `${url}revalidation?wikiId=${id}`
2525
}
2626

2727
try {
28-
const res = await axios.get(revalidateUrl)
28+
const res = await axios.post(revalidateUrl)
2929
console.log('♻️ REVALIDATING :', res.data)
3030
} catch (e) {
3131
console.log('🚨 ERROR REVALIDATING: ', e)

src/services/wikiUpdates.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interface ApiResponse {
1111

1212
const myCache = new NodeCache({ stdTTL: 100, checkperiod: 120 })
1313

14-
const retryTime = 36000
14+
const retryTime = 15000
1515
const notifyCount = 20 // every 20 count interval = 10mins
1616
@singleton()
1717
export default class WikiUpdates {

0 commit comments

Comments
 (0)