File tree 2 files changed +17
-0
lines changed
runtimes/nodejs/src/support
2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,15 @@ export class DatabaseChangeStream {
22
22
stream . on ( 'change' , async ( _change ) => {
23
23
this . updateEnvironments ( )
24
24
} )
25
+
26
+ stream . on ( 'close' , ( ) => {
27
+ logger . info ( 'Conf collection change stream closed.' )
28
+ setTimeout ( ( ) => {
29
+ logger . info ( 'Reconnecting conf collection change stream...' )
30
+ this . watchConf ( )
31
+ } , 3000 )
32
+ } )
33
+
25
34
}
26
35
27
36
private static async updateEnvironments ( ) {
Original file line number Diff line number Diff line change @@ -71,6 +71,14 @@ export class FunctionCache {
71
71
}
72
72
}
73
73
} )
74
+
75
+ stream . on ( 'close' , ( ) => {
76
+ logger . error ( 'Cloud function change stream closed' )
77
+ setTimeout ( ( ) => {
78
+ logger . info ( 'Reconnecting cloud function change stream...' )
79
+ this . streamChange ( )
80
+ } , 3000 )
81
+ } )
74
82
}
75
83
76
84
/**
You can’t perform that action at this time.
0 commit comments