@@ -538,6 +538,14 @@ export class WorkspaceService {
538
538
const lastActive =
539
539
instance ?. stoppingTime || instance ?. startedTime || instance ?. creationTime || workspace ?. creationTime ;
540
540
if ( ! lastActive && ! activeNow ) {
541
+ log . warn (
542
+ { userId, workspaceId } ,
543
+ "[updateDeletionEligibilityTime] No last active time found, skipping update of deletion eligibility time" ,
544
+ {
545
+ workspace,
546
+ instance,
547
+ } ,
548
+ ) ;
541
549
return ;
542
550
}
543
551
const deletionEligibilityTime = activeNow ? new Date ( ) : new Date ( lastActive ) ;
@@ -567,7 +575,7 @@ export class WorkspaceService {
567
575
) {
568
576
log . warn (
569
577
{ userId, workspaceId, instanceId : instance ?. id } ,
570
- "Prevented moving deletion eligibility time backwards" ,
578
+ "[updateDeletionEligibilityTime] Prevented moving deletion eligibility time backwards" ,
571
579
{
572
580
hasGitChanges,
573
581
timestamps : new TrustedValue ( {
@@ -587,7 +595,11 @@ export class WorkspaceService {
587
595
deletionEligibilityTime : deletionEligibilityTime . toISOString ( ) ,
588
596
} ) ;
589
597
} catch ( error ) {
590
- log . error ( { userId, workspaceId } , "Failed to update deletion eligibility time" , error ) ;
598
+ log . error (
599
+ { userId, workspaceId } ,
600
+ "[updateDeletionEligibilityTime] Failed to update deletion eligibility time" ,
601
+ error ,
602
+ ) ;
591
603
}
592
604
}
593
605
0 commit comments