File tree Expand file tree Collapse file tree 3 files changed +19
-6
lines changed
Expand file tree Collapse file tree 3 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -32,9 +32,10 @@ export function createValueEmitter<T>(): ValueEmitter<T> {
3232 } ,
3333 onChange ( callback ) {
3434 callbacks . push ( callback ) ;
35- if ( currentValue ) {
36- void Promise . resolve ( callback ( currentValue ) ) . catch ( ( ) => { } ) ;
37- }
35+ void Promise . resolve ( callback ( currentValue ) ) . catch ( ( ) => { } ) ;
36+ // if (currentValue !== undefined) {
37+ // void Promise.resolve(callback(currentValue)).catch(() => {});
38+ // }
3839 } ,
3940 } ;
4041}
Original file line number Diff line number Diff line change @@ -36,12 +36,19 @@ export function createLocalStackContainerStatusTracker(
3636
3737 void timeTracker . run ( "container-status.getContainerStatus" , async ( ) => {
3838 await getContainerStatus ( containerName ) . then ( ( newStatus ) => {
39- if ( status . value ( ) !== undefined ) {
39+ outputChannel . trace (
40+ `[localstack-container-status] getContainerStatus=${ newStatus } currentStatus=${ status . value ( ) } ` ,
41+ ) ;
42+ if ( status . value ( ) === undefined ) {
4043 status . setValue ( newStatus ) ;
4144 }
4245 } ) ;
4346 } ) ;
4447
48+ status . onChange ( ( status ) => {
49+ outputChannel . trace ( `[localstack-container-status] container=${ status } ` ) ;
50+ } ) ;
51+
4552 return {
4653 status ( ) {
4754 return status . value ( ) ;
Original file line number Diff line number Diff line change @@ -40,12 +40,17 @@ export function createLocalStackInstanceStatusTracker(
4040 } ;
4141
4242 const deriveStatus = ( ) => {
43+ outputChannel . trace (
44+ `[localstack-instance-status] containerStatus=${ containerStatus } healthCheckStatusTracker=${ healthCheckStatusTracker . status ( ) } previousStatus=${ status . value ( ) } ` ,
45+ ) ;
4346 const newStatus = getLocalStackStatus (
4447 containerStatus ,
4548 healthCheckStatusTracker . status ( ) ,
4649 status . value ( ) ,
4750 ) ;
48- setStatus ( newStatus ) ;
51+ if ( newStatus ) {
52+ setStatus ( newStatus ) ;
53+ }
4954 } ;
5055
5156 containerStatusTracker . onChange ( ( newContainerStatus ) => {
@@ -65,7 +70,7 @@ export function createLocalStackInstanceStatusTracker(
6570
6671 containerStatusTracker . onChange ( ( newContainerStatus ) => {
6772 outputChannel . trace (
68- `[localstack-status] container=${ newContainerStatus } (localstack=${ status . value ( ) } )` ,
73+ `[localstack-instance- status] container=${ newContainerStatus } (localstack=${ status . value ( ) } )` ,
6974 ) ;
7075
7176 if ( newContainerStatus === "running" && status . value ( ) !== "running" ) {
You can’t perform that action at this time.
0 commit comments