import { getServiceToken } from "@scandic-hotels/common/tokenManager" import { getCountries } from "@scandic-hotels/trpc/routers/hotels/services/getCountries" import type { Lang } from "@scandic-hotels/common/constants/language" import type { WarmupFunction, WarmupResult } from "." export const warmupCountry = (lang: Lang): WarmupFunction => async (): Promise => { try { const serviceToken = await getServiceToken() await getCountries({ lang: lang, serviceToken: serviceToken.access_token, warmup: true, }) } catch (error) { return { status: "error", error: error as Error, } } return { status: "completed", } }