Caddy: ACME account email (expiry notices, ZeroSSL fallback); regions: batch-sized first
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
1cd2336823
commit
75e16d4ea2
2 changed files with 6 additions and 1 deletions
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
{
|
||||
admin off
|
||||
# The ACME account: expiry notices, and ZeroSSL (the fallback issuer) requires one.
|
||||
email admin@saty.dev
|
||||
}
|
||||
|
||||
saty.dev {
|
||||
|
|
|
|||
|
|
@ -69,7 +69,10 @@ export class Regions {
|
|||
if (free && !g.free) continue;
|
||||
out.push(g);
|
||||
}
|
||||
out.sort((a, b) => Number(b.free) - Number(a.free) || a.claimedBy.length - b.claimedBy.length || b.open - a.open || a.key.localeCompare(b.key));
|
||||
// A good region is one agent's batch: 5 to 80 open functions first, then bigger ones (share
|
||||
// them, or take them in parts), then the tiny ones.
|
||||
const size = (g) => (g.open >= 5 && g.open <= 80 ? 0 : g.open > 80 ? 1 : 2);
|
||||
out.sort((a, b) => Number(b.free) - Number(a.free) || a.claimedBy.length - b.claimedBy.length || size(a) - size(b) || b.open - a.open || a.key.localeCompare(b.key));
|
||||
return { total: out.length, regions: out.slice(0, Math.min(Math.max(1, limit | 0), 1000)) };
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue