File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ export default async function handler(
2828 const apiToken = process . env . NETLIFY_API_TOKEN
2929
3030 if ( siteId && apiToken ) {
31- const res = await fetch ( 'https://api.netlify.com/api/v1/purge' , {
31+ await fetch ( 'https://api.netlify.com/api/v1/purge' , {
3232 method : 'POST' ,
3333 headers : {
3434 Authorization : `Bearer ${ apiToken } ` ,
@@ -39,10 +39,6 @@ export default async function handler(
3939 paths : [ '/developers/roadmap' ]
4040 } )
4141 } )
42- } else {
43- console . warn (
44- '[sync-now] NETLIFY_SITE_ID or NETLIFY_API_TOKEN not set — skipping CDN cache purge.'
45- )
4642 }
4743
4844 return new Response (
Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ import { getStore } from '@netlify/blobs'
22import { buildSnapshot } from '../../src/linear/build-snapshot.js'
33
44export default async function handler ( ) {
5- console . log ( '[sync] Starting scheduled Linear sync...' )
6-
75 const snapshot = await buildSnapshot ( )
86
97 const store = getStore ( 'roadmap' )
@@ -14,7 +12,7 @@ export default async function handler() {
1412 const apiToken = process . env . NETLIFY_API_TOKEN
1513
1614 if ( siteId && apiToken ) {
17- const res = await fetch ( 'https://api.netlify.com/api/v1/purge' , {
15+ await fetch ( 'https://api.netlify.com/api/v1/purge' , {
1816 method : 'POST' ,
1917 headers : {
2018 Authorization : `Bearer ${ apiToken } ` ,
@@ -25,10 +23,6 @@ export default async function handler() {
2523 paths : [ '/developers/roadmap' ]
2624 } )
2725 } )
28- } else {
29- console . warn (
30- '[sync] NETLIFY_SITE_ID or NETLIFY_API_TOKEN not set — skipping CDN cache purge.'
31- )
3226 }
3327}
3428
Original file line number Diff line number Diff line change @@ -147,9 +147,7 @@ async function withRetry<T>(
147147 if ( ! isTransientError ( err ) || attempt === retries ) throw err
148148 lastErr = err
149149 const wait = delayMs * 2 ** attempt
150- console . warn (
151- `[linear] Transient error (attempt ${ attempt + 1 } /${ retries } ), retrying in ${ wait } ms...`
152- )
150+
153151 await new Promise ( ( r ) => setTimeout ( r , wait ) )
154152 }
155153 }
You can’t perform that action at this time.
0 commit comments