mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 15:51:01 +08:00
Add failback & test watchtower on my prod server.
This commit is contained in:
parent
d18f8c6234
commit
4cf8847a3d
@ -55,9 +55,14 @@ watch(
|
|||||||
); // Translate when requested?
|
); // Translate when requested?
|
||||||
|
|
||||||
const startTranslating = async (text: string) => {
|
const startTranslating = async (text: string) => {
|
||||||
|
try {
|
||||||
translateItem[text] = {
|
translateItem[text] = {
|
||||||
translateText: await translate(text, { from: "zh", to: "en" }),
|
translateText: await translate(text, { from: "zh", to: "en" }),
|
||||||
};
|
};
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Translation failed:", error);
|
||||||
|
translateItem[text] = { translateText: text }; // fallback to original text
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const aiSummary = async () => {
|
const aiSummary = async () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user