MCPcopy Create free account
hub / github.com/0PandaDEV/Ziit / createInitialImportJob

Function createInitialImportJob

server/utils/import-queue.ts:1023–1039  ·  view source on GitHub ↗
(
  jobId: string,
  userId: string,
  type: "wakatime-api" | "wakatime-file" | "wakapi",
  fileName: string,
)

Source from the content-addressed store, hash-verified

1021const importQueue = ImportQueue.getInstance();
1022
1023function createInitialImportJob(
1024 jobId: string,
1025 userId: string,
1026 type: "wakatime-api" | "wakatime-file" | "wakapi",
1027 fileName: string,
1028): ImportJob {
1029 const methodPrefix = type === "wakapi" ? "WakAPI" : "WakaTime";
1030 return {
1031 id: jobId,
1032 fileName,
1033 status: ImportStatus.Processing,
1034 message: `[${methodPrefix}] Queued`,
1035 progress: 0,
1036 userId,
1037 type,
1038 };
1039}
1040
1041export const queueWakatimeApiImport = (
1042 apiKey: string,

Callers 3

getOrCreateJobMethod · 0.85
queueWakatimeApiImportFunction · 0.85
queueWakApiImportFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected