New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@pulsecron/pulse

Package Overview
Dependencies
Maintainers
0
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pulsecron/pulse - npm Package Compare versions

Comparing version 1.5.2 to 1.6.0

1

dist/job/index.d.ts

@@ -31,2 +31,3 @@ import * as mongodb from 'mongodb';

disabled?: boolean;
progress?: number;
nextRunAt?: Date | null;

@@ -33,0 +34,0 @@ lockedAt?: Date | null;

2

dist/job/touch.d.ts
import { Job } from '.';
export type TouchMethod = () => Promise<Job>;
export type TouchMethod = (progress?: number) => Promise<Job>;
export declare const touch: TouchMethod;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.touch = void 0;
const touch = async function () {
const utils_1 = require("src/utils");
const touch = async function (progress) {
if (progress && (progress < 0 || progress > 100)) {
throw new utils_1.JobError('Progress must be a number between 0 and 100');
}
this.attrs.lockedAt = new Date();
this.attrs.progress = progress;
return this.save();

@@ -7,0 +12,0 @@ };

{
"name": "@pulsecron/pulse",
"version": "1.5.2",
"version": "1.6.0",
"description": "The modern MongoDB-powered job scheduler library for Node.js",

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

@@ -153,3 +153,3 @@ <p align="center">

| [schedule.ts](https://github.com/pulsecron/pulse/blob/master/src/job/schedule.ts) | Schedule.ts in the job directory empowers a certain task to run at a predefined time. Using this feature, users can set either a specific date or a string pattern to determine the next execution instance of a job, thereby enhancing the scheduling capabilities in the overall Pulse project. |
| [touch.ts](https://github.com/pulsecron/pulse/blob/master/src/job/touch.ts) | Touch.ts within the job directory of the Pulse repository manages job concurrency. It updates a jobs lockedAt time, preventing multiple instances from running simultaneously. The function returns a Promise for the saved job. |
| [touch.ts](https://github.com/pulsecron/pulse/blob/master/src/job/touch.ts) | Touch.ts within the job directory of the Pulse repository manages job concurrency. It updates a jobs lockedAt time, preventing multiple instances from running simultaneously. Can have an optional progress parameter (0-100). The function returns a Promise for the saved job. |
| [compute-next-run-at.ts](https://github.com/pulsecron/pulse/blob/master/src/job/compute-next-run-at.ts) | <code>► INSERT-TEXT-HERE</code> |

@@ -156,0 +156,0 @@ | [to-json.ts](https://github.com/pulsecron/pulse/blob/master/src/job/to-json.ts) | Transforms job details into a storable JSON object within the repositorys job management module. Converts key date attributes into the Date data type, facilitating data interchange with MongoDB. |

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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