Export: Handle synchronous 'shutdown-complete' event (already offline)
FREEBIE
This commit is contained in:
parent
d31d1712b1
commit
3d8aa3b8a2
1 changed files with 6 additions and 5 deletions
|
@ -142,11 +142,7 @@
|
||||||
this.render();
|
this.render();
|
||||||
},
|
},
|
||||||
beginMigration: function() {
|
beginMigration: function() {
|
||||||
// tells MessageReceiver to disconnect and drain its queue, will fire
|
Whisper.events.once('shutdown-complete', function() {
|
||||||
// 'shutdown-complete' event when that is done.
|
|
||||||
Whisper.Migration.init();
|
|
||||||
|
|
||||||
Whisper.events.on('shutdown-complete', function() {
|
|
||||||
Whisper.Migration.beginExport()
|
Whisper.Migration.beginExport()
|
||||||
.then(this.completeMigration.bind(this))
|
.then(this.completeMigration.bind(this))
|
||||||
.catch(this.onError.bind(this));
|
.catch(this.onError.bind(this));
|
||||||
|
@ -155,6 +151,11 @@
|
||||||
this.render();
|
this.render();
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
||||||
|
// tells MessageReceiver to disconnect and drain its queue, will fire
|
||||||
|
// 'shutdown-complete' event when that is done. Might result in a synchronous
|
||||||
|
// event, so call it after we register our callback.
|
||||||
|
Whisper.Migration.init();
|
||||||
|
|
||||||
// Rendering because we're now in the 'disconnected' state
|
// Rendering because we're now in the 'disconnected' state
|
||||||
this.render();
|
this.render();
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue