( jobId: string, userId: string, type: "wakatime-api" | "wakatime-file" | "wakapi", fileName: string, )
| 1021 | const importQueue = ImportQueue.getInstance(); |
| 1022 | |
| 1023 | function 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 | |
| 1041 | export const queueWakatimeApiImport = ( |
| 1042 | apiKey: string, |
no outgoing calls
no test coverage detected