File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 77
77
track ( 'message: ' + data . data + ' from ' + data . origin ) ;
78
78
} ) ;
79
79
sysend . track ( 'message' , function once ( data ) {
80
+ // one time welcome message reply to primary
80
81
if ( ! sysend . isPrimary ( ) ) {
82
+ track ( 'send: Thanks' ) ;
81
83
sysend . post ( data . origin , 'Thanks for the message' ) ;
82
84
}
83
85
sysend . untrack ( 'message' , once ) ;
86
88
count ( data . count ) ;
87
89
if ( sysend . isPrimary ( ) ) {
88
90
track ( 'close: ' + id ( data . id ) + ', last - become primary' ) ;
91
+ } else if ( data . wasPrimary ) {
92
+ track ( 'close: ' + id ( data . id ) + ', primary was closed' ) ;
89
93
} else {
90
94
track ( 'close: ' + id ( data . id ) ) ;
91
95
}
92
96
list ( ) ;
93
97
} ) ;
94
98
sysend . track ( 'primary' , function ( ) {
95
- track ( 'track: primary' ) ;
99
+ track ( 'track: become primary' ) ;
96
100
} ) ;
97
101
sysend . track ( 'secondary' , function ( ) {
98
102
track ( 'track: secondary' ) ;
You can’t perform that action at this time.
0 commit comments