mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
added basic logger to metadata reader...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
c14dc89280
commit
e88a84bfda
@ -173,6 +173,13 @@ var MetadataReaderActions = actions.Actions({
|
||||
// XXX make this a global API...
|
||||
var q = this.__reader_queue = this.__reader_queue || tasks.Queue()
|
||||
|
||||
var logger = this.logger && this.logger.push('Read metadata')
|
||||
|
||||
// XXX is this the right way to go???
|
||||
q.on('taskQueued', function(t){ logger.emit('queued', t) })
|
||||
q.on('taskDone', function(t){ logger.emit('done', t) })
|
||||
q.on('taskFailed', function(t){ logger.emit('error', t) })
|
||||
|
||||
var read = function(gid){
|
||||
return function(){ return that.readMetadata(gid) } }
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user