Sha256: 3af6b700ea324f6dcafaede51444ae161257d5dc20e1e2a0d0064e77e4d32a3d

Contents?: true

Size: 1 KB

Versions: 3

Compression:

Stored size: 1 KB

Contents

/* Copyright 2016 The Cocktail Experience, S.L. */
var conf = require('./conf'),
    http = require('request'),
    post = require('post_chistaco'),
    refreshing_matter = require('./refreshing_matter');
    chistescortos = require('./chistescortos');

exports.handler = function(event, context) {
  console.log('Received event:', JSON.stringify(event, null, 2));
  console.log('chistacojs lambda version', conf.lambda_version);

  console.log('Extracting chistaco from the refreshing_matter module');
  refreshing_matter.call(http, conf, function(err, chistaco) {
    if (err) {
      console.log(err, err.stack);
      context.fail(err);
    } else {
      console.log("Received: " + chistaco);
      console.log("Sending to " + conf.url + "...");
      post.call(http, conf, chistaco, function(err, data) {
        if (err) {
          console.log(err, err.stack);
          context.fail(err);
        } else {
          console.log("Response: " + data);
          context.succeed(0);
        }
      });
    }
  });
};

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tck-lambdas-0.3.0 lib/tck/lambdas/chistacojs/chistaco_diario.js
tck-lambdas-0.2.0 lib/tck/lambdas/chistacojs/chistaco_diario.js
tck-lambdas-0.1.6 lib/tck/lambdas/chistacojs/chistaco_diario.js