This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var LINE = require('./line.js'); | |
var line = new LINE(); | |
var email = 'your email'; | |
var password = 'your password'; | |
line.login(email, password, function(error, result) { | |
if (error) { | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const CronJob = require('cron').CronJob | |
const amqp = require('amqp-connection-manager') | |
const AMQP_URL = process.env.CLOUDAMQP_URL || 'amqp://localhost'; | |
if (!AMQP_URL) process.exit(1) | |
const WORKER_QUEUE = 'worker-queue' // To consume from worker process | |
const CLOCK_QUEUE = 'clock-queue' // To consume from clock process | |
const JOBS = [{ // You could store these jobs in a database | |
name: "Cron process 1", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const amqp = require('amqp-connection-manager') | |
const AMQP_URL = process.env.CLOUDAMQP_URL || 'amqp://localhost'; | |
if (!AMQP_URL) process.exit(1) | |
const WORKER_QUEUE = 'worker-queue' | |
// Create a new connection manager from AMQP | |
var connection = amqp.connect([AMQP_URL]) |