시간 도메인과 정지 중 메시지·베팅 경계 정리
This commit is contained in:
@@ -85,7 +85,7 @@ const main = async (): Promise<void> => {
|
||||
process.once('SIGINT', () => void stop());
|
||||
process.once('SIGTERM', () => void stop());
|
||||
while (!stopping) {
|
||||
const now = Date.now();
|
||||
const now = performance.now();
|
||||
if (now >= nextWorkspaceCleanupAt) {
|
||||
nextWorkspaceCleanupAt = now + RELEASE_WORKSPACE_CLEANUP_INTERVAL_MS;
|
||||
try {
|
||||
|
||||
@@ -510,7 +510,7 @@ export class GatewayReleaseController {
|
||||
|
||||
private async waitForReadiness(operationId: string): Promise<void> {
|
||||
await this.appendLog(operationId, 'readiness', 'Gateway API, 정적 frontend와 PM2 process readiness를 확인합니다.');
|
||||
const deadline = Date.now() + this.config.readinessTimeoutMs;
|
||||
const deadline = performance.now() + this.config.readinessTimeoutMs;
|
||||
const apiUrl = `http://127.0.0.1:${this.config.gatewayApiPort}/healthz`;
|
||||
const frontendUrl =
|
||||
this.config.frontendServeMode === 'static'
|
||||
@@ -522,7 +522,7 @@ export class GatewayReleaseController {
|
||||
const expectedNames = buildGatewayProcessDefinitions(this.config.workspaceRoot, this.config).map(
|
||||
(definition) => definition.name
|
||||
);
|
||||
while (Date.now() < deadline) {
|
||||
while (performance.now() < deadline) {
|
||||
try {
|
||||
const [api, frontend] = await Promise.all([
|
||||
this.fetchImpl(apiUrl),
|
||||
|
||||
@@ -92,8 +92,8 @@ export const upgradeReleaseController = async (options: {
|
||||
}
|
||||
try {
|
||||
await options.processManager.start(buildReleaseControllerDefinition(workspace.root, options.config));
|
||||
const deadline = Date.now() + (options.readinessTimeoutMs ?? options.config.readinessTimeoutMs);
|
||||
while (Date.now() < deadline) {
|
||||
const deadline = performance.now() + (options.readinessTimeoutMs ?? options.config.readinessTimeoutMs);
|
||||
while (performance.now() < deadline) {
|
||||
const matching = (await options.processManager.list()).filter(
|
||||
(process) => process.name === CONTROLLER_PROCESS_NAME
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user