<commit_before>import kueLib from 'kue';
import config from './config';

let queue = kueLib.createQueue(config.kue);

queue.process('reset-password-email', function(job, done){
  console.log(job.data);
  done();
});<commit_msg>Reset password email task.<commit_after>import kueLib from 'kue';
import config from './config';
import { renderWelcomeTemplate, renderResetTemplate } from './src/email-templates/index';
import { sendEmail } from './src/utils/email';

let queue = kueLib.createQueue(config.kue);

queue.process('reset-password-email', async function(job, done) {
  let html = await renderResetTemplate(new Date(), job.data.username, job.data.email, `http://www.libertysoil.org/newpassword/${job.data.hash}`);
  await sendEmail('Reset Libertysoil.org Password', html, job.data.email);
  done();
});

// queue.process('reset-password-email', async function(job, done){
//   let html = await renderResetTemplate(new Date(), job.data.username, job.data.email, `http://www.libertysoil.org/newpassword/${job.data.hash}`);
//   await sendEmail('Reset Libertysoil.org Password', html, job.data.email);
//   done();
// });
{'fraction_non_alphanumeric': 0.1736420302760463, 'fraction_numerical': 0.0, 'mean_word_length': 5.14207650273224, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5944102', 'n_tokens_mistral': 354, 'n_tokens_neox': 356, 'n_words': 77}