fix: widen rents.usd_amount column, add webhook alias, silence cron spam
- Migration to ALTER rents.usd_amount from numeric(5,2) to numeric(15,2) which was causing "numeric field overflow" 500 errors when saving rental prices >= 1000 sats (e.g. 1200 sats) - Also widen season_rents.usd_amount for consistency - Add /webhooks/btcpay route alias (BTCPay was posting to /btcpay but the endpoint was /btcpay-webhook, causing 404s on payment callbacks) - Skip ECS autoscaling cron when TRANSCODING_API_URL is not set (eliminates "security token invalid" error spam every minute) - Reduce payment cron from EVERY_MINUTE to EVERY_10_MINUTES to avoid 429 rate limiting on the BTC price API - Bump API CACHEBUST to 10 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -102,10 +102,12 @@ export class TranscodingServerService {
|
||||
Logger.log(`Auto Scaling group scaled to ${desiredCount} instances`);
|
||||
}
|
||||
|
||||
// Run the autoscaling logic every hour
|
||||
// Run the autoscaling logic every hour (AWS ECS only).
|
||||
// Skip when using the local FFmpeg worker (no TRANSCODING_API_URL).
|
||||
@Cron(CronExpression.EVERY_MINUTE)
|
||||
async autoscaleEcsService() {
|
||||
if (process.env.ENVIRONMENT !== 'production') return;
|
||||
if (!process.env.TRANSCODING_API_URL) return;
|
||||
try {
|
||||
const queueSize = await this.getQueueSize();
|
||||
const currentTaskCount = await this.describeService(
|
||||
|
||||
Reference in New Issue
Block a user