<commit_before>var api = require('ripple-gateway-data-sequelize-adapter');
var send = require("../lib/send_payment");
var nconf = require("../config/nconf");
var build_payment = require('../lib/build_payment');
var gateway = require('../lib/gateway');

process.env.DATABASE_URL = nconf.get('DATABASE_URL');

function workJob() {

  gateway.payments.listOutgoing(function(err, transactions) {
    console.log(transactions[0])
    if (!err) {
      var transaction = transactions[0];
      if (transaction) {
        api.rippleAddresses.read(transaction.to_address_id, function(err, address) {
          var address = address.address,
              amount = transaction.to_amount,
              currency = transaction.to_currency;

          build_payment(address, amount, currency, function(err, payment) {
            console.log('built payment');

            if (err) { 
              console.log(err);
              if (err == 'No paths found') { 
                transaction.transaction_state = 'no_path_found';
                transaction.save().complete(function(){
                  setTimeout(workJob, 1000);
                });
                return;<commit_msg>[CHORE] Remove console.log statements.<commit_after>var api = require('ripple-gateway-data-sequelize-adapter');
var send = require("../lib/send_payment");
var nconf = require("../config/nconf");
var build_payment = require('../lib/build_payment');
var gateway = require('../lib/gateway');

process.env.DATABASE_URL = nconf.get('DATABASE_URL');

function workJob() {

  gateway.payments.listOutgoing(function(err, transactions) {
    if (!err) {
      var transaction = transactions[0];
      if (transaction) {
        api.rippleAddresses.read(transaction.to_address_id, function(err, address) {
          var address = address.address,
              amount = transaction.to_amount,
              currency = transaction.to_currency;

          build_payment(address, amount, currency, function(err, payment) {

            if (err) { 
              console.log(err);
              if (err == 'No paths found') { 
                transaction.transaction_state = 'no_path_found';
                transaction.save().complete(function(){
                  setTimeout(workJob, 1000);
                });
                return;
{'fraction_non_alphanumeric': 0.13208369659982563, 'fraction_numerical': 0.004795117698343505, 'mean_word_length': 2.493150684931507, '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': '620907', 'n_tokens_mistral': 652, 'n_tokens_neox': 616, 'n_words': 119}