@@ -120,13 +120,9 @@ class TapeCloudUtils {
120120
121121 // Find the line in the stdout which has the line 'task ID is, <id>' and extract id
122122 // ID in latest version must look like 1005:1111:4444
123- let match = stdout . match ( / t a s k I D i s ( \d + : \d + : \d + ) / ) ;
124- if ( ! match || match . length !== 2 ) {
125- // Fallback to the older task ID extraction in case we fail to extract new one
126- match = stdout . match ( / t a s k I D i s ( \d + ) / ) ;
127- if ( ! match || match . length !== 2 ) {
128- throw error ;
129- }
123+ const match = stdout . match ( / t a s k I D i s ( [ \w ] + ( : [ \w ] + ) * ) / ) ;
124+ if ( ! match || match . length < 2 ) {
125+ throw error ;
130126 }
131127
132128 const task_id = match [ 1 ] ;
@@ -196,9 +192,9 @@ class TapeCloudUtils {
196192
197193class TapeCloudGlacier extends Glacier {
198194 /**
199- * @param {nb.NativeFSContext } fs_context
200- * @param {LogFile } log_file
201- * @param {(entry: string) => Promise<void> } failure_recorder
195+ * @param {nb.NativeFSContext } fs_context
196+ * @param {LogFile } log_file
197+ * @param {(entry: string) => Promise<void> } failure_recorder
202198 * @returns {Promise<boolean> }
203199 */
204200 async stage_migrate ( fs_context , log_file , failure_recorder ) {
@@ -265,9 +261,9 @@ class TapeCloudGlacier extends Glacier {
265261 }
266262
267263 /**
268- * @param {nb.NativeFSContext } fs_context
269- * @param {LogFile } log_file
270- * @param {(entry: string) => Promise<void> } failure_recorder
264+ * @param {nb.NativeFSContext } fs_context
265+ * @param {LogFile } log_file
266+ * @param {(entry: string) => Promise<void> } failure_recorder
271267 * @returns {Promise<boolean> }
272268 */
273269 async migrate ( fs_context , log_file , failure_recorder ) {
@@ -311,9 +307,9 @@ class TapeCloudGlacier extends Glacier {
311307 }
312308
313309 /**
314- * @param {nb.NativeFSContext } fs_context
315- * @param {LogFile } log_file
316- * @param {(entry: string) => Promise<void> } failure_recorder
310+ * @param {nb.NativeFSContext } fs_context
311+ * @param {LogFile } log_file
312+ * @param {(entry: string) => Promise<void> } failure_recorder
317313 * @returns {Promise<boolean> }
318314 */
319315 async stage_restore ( fs_context , log_file , failure_recorder ) {
@@ -375,9 +371,9 @@ class TapeCloudGlacier extends Glacier {
375371 }
376372
377373 /**
378- * @param {nb.NativeFSContext } fs_context
379- * @param {LogFile } log_file
380- * @param {(entry: string) => Promise<void> } failure_recorder
374+ * @param {nb.NativeFSContext } fs_context
375+ * @param {LogFile } log_file
376+ * @param {(entry: string) => Promise<void> } failure_recorder
381377 * @returns {Promise<boolean> }
382378 */
383379 async restore ( fs_context , log_file , failure_recorder ) {
0 commit comments