Releases from git tags and WHATS-NEW.md; docs, changelog (1.4.0)
The Hub reads the Cross Events repo's v* tags (each a release, the newest the latest version) and the client notes from WHATS-NEW.md as of the newest tag, every 15 minutes and on Sync now. Urgent/security in a version heading marks it urgent. Repo address, notes path and an optional encrypted token on the Releases page; manual releases only when no repo is set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,7 @@ const app = require('./app');
|
||||
const { keyPair } = require('./utils/licenceToken');
|
||||
const { runAlerts, rollupHeartbeats } = require('./utils/alerts');
|
||||
const { importSmtpFromEnv } = require('./utils/settings');
|
||||
const { syncReleases } = require('./utils/releaseSync');
|
||||
|
||||
// Fail early if the licence signing key is missing or wrong.
|
||||
try {
|
||||
@@ -28,11 +29,13 @@ importSmtpFromEnv()
|
||||
const PORT = parseInt(process.env.PORT || '5200', 10);
|
||||
app.listen(PORT, () => console.log(`[hub] Listening on ${PORT}`));
|
||||
|
||||
// Background checks: alerts every 5 minutes, heartbeat roll-up once a day. The Hub runs as a
|
||||
// Background checks: alerts every 5 minutes, releases from git every 15, heartbeat roll-up once a day. The Hub runs as a
|
||||
// single process, so plain timers are enough.
|
||||
if (String(process.env.JOBS_ENABLED || 'true').toLowerCase() !== 'false') {
|
||||
const every = (ms, name, fn) => setInterval(() => fn().catch(e => console.warn(`[hub] ${name} failed:`, e?.message || e)), ms);
|
||||
every(5 * 60 * 1000, 'alerts', () => runAlerts());
|
||||
every(15 * 60 * 1000, 'release sync', () => syncReleases());
|
||||
every(24 * 60 * 60 * 1000, 'heartbeat roll-up', () => rollupHeartbeats());
|
||||
setTimeout(() => runAlerts().catch(() => {}), 30 * 1000);
|
||||
setTimeout(() => syncReleases().catch(e => console.warn('[hub] release sync failed:', e?.message || e)), 20 * 1000);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user