export async function diagnose(event){
const { source, site, type } = event;
if (source === 'uptime' && type === 'down') {
const deploy = await lastDeployWithin(site, 30);
if (deploy) return { severity: 1, fix: 'roll back' };
}
}
async function checkSite(site){
const r = await probe(site);
if (r.ok && prev.state === 'down')
await processEvent({ type: 'up' });
}
export function thresholdAlert(daysLeft){
if (daysLeft > 30) return null;
return { severity: crossed.severity };
}
const broken = await crawlSite(site);
if (broken.length && fp !== prev.fingerprint)
await processEvent({ source: 'linkcheck', broken });
window.addEventListener('error', (e) =>
report('js_error', e.message));
export const SLA = { 1: 60, 2: 240, 3: 1440 };
schedule: '*/5 * * * *'
export async function diagnose(event){
const { source, site, type } = event;
if (source === 'uptime' && type === 'down') {
const deploy = await lastDeployWithin(site, 30);
if (deploy) return { severity: 1, fix: 'roll back' };
}
}
async function checkSite(site){
const r = await probe(site);
if (r.ok && prev.state === 'down')
await processEvent({ type: 'up' });
}
export function thresholdAlert(daysLeft){
if (daysLeft > 30) return null;
return { severity: crossed.severity };
}
const broken = await crawlSite(site);
if (broken.length && fp !== prev.fingerprint)
await processEvent({ source: 'linkcheck', broken });
window.addEventListener('error', (e) =>
report('js_error', e.message));
export const SLA = { 1: 60, 2: 240, 3: 1440 };
schedule: '*/5 * * * *'
async function checkSite(site){
const r = await probe(site);
if (r.ok && prev.state === 'down')
await processEvent({ type: 'up' });
}
export function thresholdAlert(daysLeft){
if (daysLeft > 30) return null;
return { severity: crossed.severity };
}
const broken = await crawlSite(site);
if (broken.length && fp !== prev.fingerprint)
await processEvent({ source: 'linkcheck', broken });
window.addEventListener('error', (e) =>
report('js_error', e.message));
export const SLA = { 1: 60, 2: 240, 3: 1440 };
schedule: '*/5 * * * *'
export async function diagnose(event){
const { source, site, type } = event;
if (source === 'uptime' && type === 'down') {
const deploy = await lastDeployWithin(site, 30);
if (deploy) return { severity: 1, fix: 'roll back' };
}
}
async function checkSite(site){
const r = await probe(site);
if (r.ok && prev.state === 'down')
await processEvent({ type: 'up' });
}
export function thresholdAlert(daysLeft){
if (daysLeft > 30) return null;
return { severity: crossed.severity };
}
const broken = await crawlSite(site);
if (broken.length && fp !== prev.fingerprint)
await processEvent({ source: 'linkcheck', broken });
window.addEventListener('error', (e) =>
report('js_error', e.message));
export const SLA = { 1: 60, 2: 240, 3: 1440 };
schedule: '*/5 * * * *'
export async function diagnose(event){
const { source, site, type } = event;
if (source === 'uptime' && type === 'down') {
const deploy = await lastDeployWithin(site, 30);
if (deploy) return { severity: 1, fix: 'roll back' };
}
}
if (daysLeft > 30) return null;
return { severity: crossed.severity };
}
const broken = await crawlSite(site);
if (broken.length && fp !== prev.fingerprint)
await processEvent({ source: 'linkcheck', broken });
window.addEventListener('error', (e) =>
report('js_error', e.message));
export const SLA = { 1: 60, 2: 240, 3: 1440 };
schedule: '*/5 * * * *'
export async function diagnose(event){
const { source, site, type } = event;
if (source === 'uptime' && type === 'down') {
const deploy = await lastDeployWithin(site, 30);
if (deploy) return { severity: 1, fix: 'roll back' };
}
}
async function checkSite(site){
const r = await probe(site);
if (r.ok && prev.state === 'down')
await processEvent({ type: 'up' });
}
export function thresholdAlert(daysLeft){
if (daysLeft > 30) return null;
return { severity: crossed.severity };
}
const broken = await crawlSite(site);
if (broken.length && fp !== prev.fingerprint)
await processEvent({ source: 'linkcheck', broken });
window.addEventListener('error', (e) =>
report('js_error', e.message));
export const SLA = { 1: 60, 2: 240, 3: 1440 };
schedule: '*/5 * * * *'
export async function diagnose(event){
const { source, site, type } = event;
if (source === 'uptime' && type === 'down') {
const deploy = await lastDeployWithin(site, 30);
if (deploy) return { severity: 1, fix: 'roll back' };
}
}
async function checkSite(site){
const r = await probe(site);
if (r.ok && prev.state === 'down')
await processEvent({ type: 'up' });
}
export function thresholdAlert(daysLeft){