"use strict";
/**
 * Weather Service Headless Pool
 * Using the unified headless pool system from @things-factory/shell
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.getBrowserPool = getBrowserPool;
const shell_1 = require("@things-factory/shell");
// Create the weather pool instance
const weatherPool = (0, shell_1.getOrCreateHeadlessPool)('weather', {
    min: 1,
    max: 5,
    headless: 'new', // Keep 'new' for weather compatibility
    args: [
        ...shell_1.HEADLESS_POOL_ARGUMENT_SETS.basic,
        ...shell_1.HEADLESS_POOL_ARGUMENT_SETS.keychain_safe,
        ...shell_1.HEADLESS_POOL_ARGUMENT_SETS.security_enhanced
    ],
    acquireTimeoutMillis: 10000,
    idleTimeoutMillis: 30000, // 30초 후 유휴 인스턴스 제거
    testOnBorrow: true,
    enableCleanup: true
});
/**
 * 헤드리스 브라우저 풀 가져오기 (싱글톤 패턴)
 */
function getBrowserPool() {
    return {
        acquire: () => weatherPool.acquire(),
        release: (resource) => weatherPool.release(resource),
        drain: () => weatherPool.cleanup(),
        clear: () => weatherPool.reset()
    };
}
//# sourceMappingURL=headless-pool.js.map