Registry / storage / ftp-management-queue

ftp-management-queue

JSON →
library5.7.1jsnpmunverified

Queue-based file processing system for FTP/SFTP servers (v5.7.1). Uses Kue (Redis-backed) to monitor upload directories, enqueue files, and process them with user-defined callbacks. Supports multiple FTP configurations, file format filtering, and concurrency control. Differentiates itself by combining FTP monitoring with job queue management, handling file state transitions (upload → enqueued → processing → processed/error). Stable but infrequently updated. Requires Redis and Kue as peer dependencies.

storagedevops
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Package uses CommonJS and exports a function. ES import may not work without special configuration.

const FtpManagementQueue = require('ftp-management-queue'); FtpManagementQueue(options);

Exported directly as function, not as named export.

const FtpManagementQueue = require('ftp-management-queue');

Library is invoked as a function, not a constructor. No 'new' keyword.

FtpManagementQueue(options);

Basic setup that monitors an FTP directory, enqueues CSV files, and processes them with a custom callback that runs for 10 seconds.

const kue = require('kue'); const queue = kue.createQueue(); const processFile = (params, cb) => { console.log(`Processing file: ${params.fileName}`); setTimeout(() => { cb(); }, 10000); }; const options = { queue, fileFormats: ['.csv'], numberOfProcess: { itemsManagerProcess: 1, fileBatchProcess: 1 }, processNames: { manager: 'manager-queue', processor: 'processor-queue' }, items: [ { id: '1', name: 'Brand1', priority: 'normal', type: 'ftp', ftp: { host: process.env.FTP_HOST ?? '', port: 21, user: process.env.FTP_USER ?? '', password: process.env.FTP_PASSWORD ?? '' }, dir: { upload: '/path/to/upload', enqueued: '/path/to/enqueued', processing: '/path/to/processing', error: '/path/to/error', processed: '/path/to/processed', backup: '/path/to/backup' } } ], customCallback: processFile, filePath: __dirname }; const FtpManagementQueue = require('ftp-management-queue'); FtpManagementQueue(options);
Debug
Known footguns
gotchaThe library mutates the options object; do not reuse the same options object for multiple calls.
deprecatedKue is no longer actively maintained; consider Bull or Bee-Queue for new projects.
gotchaAll directory paths must be absolute; relative paths may cause unexpected behavior.
breakingRemoved support for XML file parsing in v5. Refer to XML-specific options no longer work.
gotchaThe library assumes Redis is running on default localhost:6379. No connection error handling.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
16 hits · last 30 days
bytedance
4
gptbot
3
ahrefsbot
1
Resources