Last active
          October 5, 2016 07:08 
        
      - 
      
 - 
        
Save Bersam/c46148decf0acf4b8544a66f13f11bcd to your computer and use it in GitHub Desktop.  
Revisions
- 
        
Bersam renamed this gist
Oct 5, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. - 
        
Bersam created this gist
Aug 12, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ var clean = function(self){ return self.pause() .then(function() { log.info(self.data.username + " is paused."); self.toFollow.on('cleaned', function(job, type) { console.log('Cleaned %s %s jobs', job.length, type); }); return self.toFollow.clean(0, 'completed'); }) .then(function() { self.toUnfollow.on('cleaned', function(job, type) { console.log('Cleaned %s %s jobs', job.length, type); }); return self.toUnfollow.clean(0, 'completed'); }) .then(function() { self.toSeekQ.on('cleaned', function(job, type) { console.log('Cleaned %s %s jobs', job.length, type); }); return self.toSeekQ.clean(0, 'completed'); }) .then(function() { return self.resume(); }) }