|
|
@@ -68,7 +68,7 @@ class PdfConvertService implements OnInit {
|
|
|
jobId: string,
|
|
|
expirationDate: Date,
|
|
|
status: JobStatusSharedWithGrowi,
|
|
|
- appId?: string,
|
|
|
+ appId?: number,
|
|
|
): Promise<void> {
|
|
|
const isJobNew = !(jobId in this.jobList);
|
|
|
|
|
|
@@ -143,7 +143,7 @@ class PdfConvertService implements OnInit {
|
|
|
* @param jobId PageBulkExportJob ID
|
|
|
* @param appId application ID for GROWI.cloud
|
|
|
*/
|
|
|
- private async readHtmlAndConvertToPdfUntilFinish(jobId: string, appId?: string): Promise<void> {
|
|
|
+ private async readHtmlAndConvertToPdfUntilFinish(jobId: string, appId?: number): Promise<void> {
|
|
|
while (!this.isJobCompleted(jobId)) {
|
|
|
// eslint-disable-next-line no-await-in-loop
|
|
|
await new Promise(resolve => setTimeout(resolve, 10 * 1000));
|
|
|
@@ -176,8 +176,8 @@ class PdfConvertService implements OnInit {
|
|
|
* @param appId application ID for GROWI.cloud
|
|
|
* @returns readable stream
|
|
|
*/
|
|
|
- private getHtmlReadable(jobId: string, appId?: string): Readable {
|
|
|
- const jobHtmlDir = path.join(this.tmpHtmlDir, appId ?? '', jobId);
|
|
|
+ private getHtmlReadable(jobId: string, appId?: number): Readable {
|
|
|
+ const jobHtmlDir = path.join(this.tmpHtmlDir, appId?.toString() ?? '', jobId);
|
|
|
const htmlFileEntries = fs.readdirSync(jobHtmlDir, { recursive: true, withFileTypes: true }).filter(entry => entry.isFile());
|
|
|
let index = 0;
|
|
|
|