Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

adonis-scheduler

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adonis-scheduler - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

2

examples/app/Tasks/Example.js

@@ -13,3 +13,3 @@ 'use strict';

// This is the function that is called at the defined schedule
static handle() {
* handle() {
// Do stuff here

@@ -16,0 +16,0 @@ }

{
"name": "adonis-scheduler",
"version": "1.0.0",
"version": "2.0.0",
"description": "Easy task scheduling for AdonisJS",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -7,2 +7,3 @@ 'use strict';

const logger = new CatLog('adonis:scheduler');
const Ioc = require('adonis-fold').Ioc;

@@ -40,4 +41,7 @@ /**

// Get instance of task class
const taskInstance = Ioc.make(Task);
// Every task must expose a handle function
if (!Task.handle) {
if (!taskInstance.handle) {
throw new Error(`No handler found for task: ${filePath}`);

@@ -50,3 +54,3 @@ }

// Register task handler
this.instance.scheduleJob(Task.schedule, Task.handle);
this.instance.scheduleJob(Task.schedule, taskInstance.handle);
} catch (e) {

@@ -53,0 +57,0 @@ // If this file is not a valid javascript class, print warning and return

@@ -5,3 +5,3 @@ 'use strict';

static handle() {
* handle() {

@@ -8,0 +8,0 @@ }

@@ -9,4 +9,4 @@ 'use strict';

static handle() {
* handle() {
}

@@ -13,0 +13,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc