Add editable weather captions and manage Threads scheduling with PM2

This commit is contained in:
2026-11-02 04:07:40 +09:00
parent 8c2113a323
commit 6ce32d33fe
17 changed files with 305 additions and 50 deletions
+10
View File
@@ -0,0 +1,10 @@
import { test } from 'node:test';
import assert from 'node:assert/strict';
import { nextRunAt } from '../server/threads/schedule.ts';
test('PM2 scheduler prepares at 03:00 Korea time regardless of host timezone', () => {
assert.equal(nextRunAt(new Date('2026-11-01T17:00:00Z')).toISOString(), '2026-11-01T18:00:00.000Z');
assert.equal(nextRunAt(new Date('2026-11-01T20:00:00Z')).toISOString(), '2026-11-01T20:00:00.000Z');
assert.equal(nextRunAt(new Date('2026-11-01T20:00:00Z'), '2026-11-02').toISOString(), '2026-11-02T18:00:00.000Z');
assert.equal(nextRunAt(new Date('2026-12-31T20:00:00Z'), '2027-01-01').toISOString(), '2027-01-01T18:00:00.000Z');
});