mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 01:26:37 +08:00
chore(server): db health check (#14779)
#### PR Dependency Tree * **PR #14779** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Added conditional init checks to service deployments and jobs to wait for the database proxy before starting * Exposed a new health port (9801) for the database proxy to enable readiness probing * **Tests** * Minor test reordering and formatting changes (no behavioral changes) <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -17,8 +17,8 @@ import type {
|
||||
UpsertCalendarSubscriptionInput,
|
||||
} from '../../../models';
|
||||
import { Models } from '../../../models';
|
||||
import { CalendarModule } from '../index';
|
||||
import { CalendarCronJobs } from '../cron';
|
||||
import { CalendarModule } from '../index';
|
||||
import {
|
||||
CalendarProvider,
|
||||
CalendarProviderFactory,
|
||||
@@ -614,9 +614,13 @@ test('pollAccounts skips syncing when cluster lock is unavailable', async t => {
|
||||
'listAllWithAccountForSync',
|
||||
async () => []
|
||||
);
|
||||
const syncAccountMock = mock.method(calendarService, 'syncAccount', async () => {
|
||||
return;
|
||||
});
|
||||
const syncAccountMock = mock.method(
|
||||
calendarService,
|
||||
'syncAccount',
|
||||
async () => {
|
||||
return;
|
||||
}
|
||||
);
|
||||
|
||||
await calendarCronJobs.pollAccounts();
|
||||
|
||||
@@ -649,9 +653,13 @@ test('pollAccounts only syncs due accounts', async t => {
|
||||
] as any
|
||||
);
|
||||
|
||||
const syncAccountMock = mock.method(calendarService, 'syncAccount', async () => {
|
||||
return;
|
||||
});
|
||||
const syncAccountMock = mock.method(
|
||||
calendarService,
|
||||
'syncAccount',
|
||||
async () => {
|
||||
return;
|
||||
}
|
||||
);
|
||||
|
||||
await calendarCronJobs.pollAccounts();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user