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

@nextastic/queue

Package Overview
Dependencies
Maintainers
0
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nextastic/queue - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

1

dist/index.d.ts
export * from './create-job';
export * from './debounced-dispatch';
export * from './get-queue';

@@ -4,0 +3,0 @@ export * from './schedule-jobs';

@@ -18,3 +18,2 @@ "use strict";

__exportStar(require("./create-job"), exports);
__exportStar(require("./debounced-dispatch"), exports);
__exportStar(require("./get-queue"), exports);

@@ -21,0 +20,0 @@ __exportStar(require("./schedule-jobs"), exports);

7

dist/schedule-jobs.d.ts
import { Queue } from './types';
export declare function scheduleJobs(queues: Queue[], schedule: () => void): Promise<void>;
interface ScheduleJobsParams {
queues: Queue[];
schedule: () => void;
}
export declare function scheduleJobs(params: ScheduleJobsParams): Promise<void>;
export {};

@@ -5,3 +5,4 @@ "use strict";

const get_queue_1 = require("./get-queue");
async function scheduleJobs(queues, schedule) {
async function scheduleJobs(params) {
const { queues, schedule } = params;
for (const queue of queues) {

@@ -8,0 +9,0 @@ const queueInstance = (0, get_queue_1.getQueue)(queue.name);

import { Queue } from './types';
interface WorkConfig {
interface WorkParams {
queues: Queue[];
jobsDir?: string;
}
export declare function work(queues: Queue[], config?: WorkConfig): Promise<void>;
export declare function work(params: WorkParams): Promise<void>;
export {};

@@ -11,4 +11,5 @@ "use strict";

const get_jobs_1 = require("./get-jobs");
async function work(queues, config = {}) {
const jobs = await (0, get_jobs_1.getJobs)(config.jobsDir);
async function work(params) {
const { queues, jobsDir } = params;
const jobs = await (0, get_jobs_1.getJobs)(jobsDir);
for (const queue of queues) {

@@ -15,0 +16,0 @@ const connection = new ioredis_1.default(process.env.REDIS_HOST, {

{
"name": "@nextastic/queue",
"version": "0.3.0",
"version": "0.3.1",
"description": "Queue provides an API to run background jobs for your application.",

@@ -5,0 +5,0 @@ "repository": {

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