How to use the zenaton.Task function in zenaton

To help you get started, we’ve selected a few zenaton examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zenaton / examples-node / WaitEvent / SendActivateEmail2.js View on Github external
var { Task } = require("zenaton");

module.exports = Task("SendActivateEmail2", function(done) {
  console.log("Sending activate email 2 to: " + this);
  console.log("- email 2 sent");
  done();
});
github zenaton / examples-node / Asynchronous / SendInvitation.js View on Github external
var { Task } = require("zenaton");

module.exports = Task("SendInvitation", function(done) {
  console.log("Sending Invitation to: " + this);
  var that = this;
  setTimeout(function(){
    console.log("Invitation Well sent to " + that);

    done();
  }, 2000 );
});
github zenaton / examples-node / src / tasks / node / taskE.js View on Github external
const { Task } = require("zenaton");
const Log = require(paths.helpers + "Log");

module.exports = Task("TaskE", {
  init(file) {
    this.file = file;
  },
  async handle() {
    Log(this.file, "Task E starts");

    throw new Error("Error in TaskE");

    Log(this.file, "Task E ends");
  }
});
github zenaton / examples-node / Sequential / SendConfirmation.js View on Github external
var Task = require("zenaton").Task;

module.exports = Task("SendConfirmation", function(done) {
    console.log("Sending notification to customer ");

    var booking_id = this.booking_id;
    console.log("Sent for: " + booking_id);
    done();
});
github zenaton / examples-node / Sequential / BookCar.js View on Github external
var { Task } = require("zenaton");

module.exports = Task("BookCar", function(done) {
  console.log("Reserving car for trip Id: " + this);
  setTimeout(function() {
    var car_id = "1547826842785";
    console.log("Reservation number: " + car_id);

    done(null, car_id);
  }, 2000);
});
github zenaton / examples-node / src / tasks / node / TaskEnd.js View on Github external
const { Task } = require("zenaton");
const Done = require(paths.helpers + "Log").done;

module.exports = Task("Done", {
  init(file) {
    this.file = file;
  },
  async handle() {
    Done(this.file);
    return 0;
  }
});

zenaton

Zenaton library

MIT
Latest version published 5 years ago

Package Health Score

39 / 100
Full package analysis

Popular zenaton functions