<commit_before>var Ezlog = require('ezlog'),
		log = new Ezlog({ p: {t:'[TaskList]', c:'green'} });


var TaskList = function TaskList (o){
  o = o || {};
  for(var key in o) this[key] = o[key]
  
  return this;
};


var proto = {};


/**
 * @method start         Check if requirements are met
 * @req    url {string}  Url to grab source code from
 */
proto.start = function (){
	//log("startin' task");

	var self = this;

	self.d.hello = 'world';

	if(self.retryMethodOnceFromFirst){
		self.retryMethodOnceFromFirst = false;

		function cb(){ self.f_next(); }

		return self.f_retryMethod(
			'getSource', cb, '@start self.retryMethodOnceFromFirst'
		);
	}

	// Let's start the f_ task list
	self.f_next();

	// Make chains possible
	return self;
};


/**
 * @method getSource          Gets a website source code
 * @data   d.source {string}  Website it's source code
 */
proto.getSource = function (retryMethod){

	var self = this;

	self.d = { hello: 'world' };

	if(self.abort)
		return self.f_abort('abort @getSource', new Error('Node err'));

	if(self.exceedRetries)
		return self.f_retryAll('exceedRetries @getSource', new Error('Node err'));

	if(self.emptyRetryErr){
		self.emptyRetryErr = false;
		return self.f_retryAll();
	}

	if(self.emptyAbortErr) return self.f_abort();


	var timeOut = 1;

	if(self.randomTimeout)
		timeOut = Math.round( (Math.random() * 40) + 10 );
	
	// Make it async
	setTimeout(function (){ self.f_next(); }, timeOut);

};


/**
 * @method writeSource        Writes a source code on HD
 * @req    d.source {string}  Website it's source page
 */
proto.writeSource = function (){<commit_msg>Got rid of default async, now only when wanted<commit_after>var Ezlog = require('ezlog'),
		log = new Ezlog({ p: {t:'[TaskList]', c:'green'} });


var TaskList = function TaskList (o){
  o = o || {};
  for(var key in o) this[key] = o[key]
  
  return this;
};


var proto = {};


/**
 * @method start         Check if requirements are met
 * @req    url {string}  Url to grab source code from
 */
proto.start = function (){
	//log("startin' task");

	var self = this;

	self.d.hello = 'world';

	if(self.retryMethodOnceFromFirst){
		self.retryMethodOnceFromFirst = false;

		function cb(){ self.f_next(); }

		return self.f_retryMethod(
			'getSource', cb, '@start self.retryMethodOnceFromFirst'
		);
	}

	// Let's start the f_ task list
	self.f_next();

	// Make chains possible
	return self;
};


/**
 * @method getSource          Gets a website source code
 * @data   d.source {string}  Website it's source code
 */
proto.getSource = function (retryMethod){

	var self = this;

	self.d = { hello: 'world' };

	if(self.abort)
		return self.f_abort('abort @getSource', new Error('Node err'));

	if(self.exceedRetries)
		return self.f_retryAll('exceedRetries @getSource', new Error('Node err'));

	if(self.emptyRetryErr){
		self.emptyRetryErr = false;
		return self.f_retryAll();
	}

	if(self.emptyAbortErr) return self.f_abort();

	if(self.randomTimeout)
		return setTimeout(function (){
			self.f_next();
		}, Math.round( (Math.random() * 40) + 10 ));
	

	self.f_next();
};


/**
 * @method writeSource        Writes a source code on HD
 * @req    d.source {string}  Website it's source page
 */
proto.writeSource = function (){
{'fraction_non_alphanumeric': 0.15382253607614368, 'fraction_numerical': 0.00276327909118821, 'mean_word_length': 3.4146341463414633, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6499045', 'n_tokens_mistral': 1192, 'n_tokens_neox': 1129, 'n_words': 306}