<commit_before>var wompt  = require("./includes");

function ChannelManager(options){
	var me = this;
	this.channels = {};
	this.count = 0;
	this.expirer = new wompt.Expirer(this.channels, {
		expire_after_ms: 60 * 60 * 1000, // 1 hour
		keep_if: function(channel){
			return channel.clients.count > 0;
		},
		time_attribute:'touched'
	});
	this.expirer.on('expired', function(channel){
		channel.clean_up();
		me.count--;
	});
}

ChannelManager.prototype = {
	get: function(name){
		return this.peek(name) || this.create(name);
	},
	
	peek: function(name){
		return this.channels[name.toLowerCase()];
	},<commit_msg>Increase channel expiration time<commit_after>var wompt  = require("./includes");

function ChannelManager(options){
	var me = this;
	this.channels = {};
	this.count = 0;
	this.expirer = new wompt.Expirer(this.channels, {
		expire_after_ms: 24 * 60 * 60 * 1000, // 24 hours
		keep_if: function(channel){
			return channel.clients.count > 0;
		},
		time_attribute:'touched'
	});
	this.expirer.on('expired', function(channel){
		channel.clean_up();
		me.count--;
	});
}

ChannelManager.prototype = {
	get: function(name){
		return this.peek(name) || this.create(name);
	},
	
	peek: function(name){
		return this.channels[name.toLowerCase()];
	},
{'fraction_non_alphanumeric': 0.16746031746031745, 'fraction_numerical': 0.01984126984126984, 'mean_word_length': 4.298319327731092, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5369675', 'n_tokens_mistral': 500, 'n_tokens_neox': 450, 'n_words': 84}