MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / runDaily

Function runDaily

deployments/desktop/static/app.js:984–1000  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

982}
983
984async function runDaily() {
985 const userId = ensureUser();
986 const days = Number($("daysInput").value || 1);
987 await loadSourceOptions();
988 const sourceOptions = collectDailyOptions();
989 const selectedSourceCount =
990 sourceOptions.arxiv_categories.length + sourceOptions.conferences.length + sourceOptions.journals.length;
991 if (!selectedSourceCount) {
992 throw new Error("请至少选择一个论文来源。");
993 }
994 setStatus("启动每日推送", true);
995 const data = await api("/api/daily/start", {
996 method: "POST",
997 body: JSON.stringify({ user_id: userId, days, ...sourceOptions }),
998 });
999 await handleDailyTask(data.task);
1000}
1001
1002async function submit(generateReports) {
1003 if (!state.push) throw new Error("请先加载一轮推送。");

Callers

nothing calls this directly

Calls 7

ensureUserFunction · 0.85
handleDailyTaskFunction · 0.85
$Function · 0.70
loadSourceOptionsFunction · 0.70
collectDailyOptionsFunction · 0.70
setStatusFunction · 0.70
apiFunction · 0.70

Tested by

no test coverage detected