Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var { Task } = require("zenaton");
module.exports = Task("SendActivateEmail2", function(done) {
console.log("Sending activate email 2 to: " + this);
console.log("- email 2 sent");
done();
});
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 );
});
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");
}
});
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();
});
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);
});
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;
}
});