1.0.0 • Published 1 year ago

@devtea2025/vero-quibusdam-laudantium-corrupti v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

minion-army

Microservice Framework for RabbitMQ Workers

usage

const Army = require('@devtea2025/vero-quibusdam-laudantium-corrupti');
const Joi = require('joi');

// Refer to lib/schema.js to see valid options
const manifest = {
    connection: { // optional, if not provided will default to a rabbit connection to local host
        rabbitUrl: 'amqp://localhost'
    },
    defaults: { // default values that apply for all workers
        exchangeName: 'my-exchange-name'
    },
    workers: [
        {
            handler: (message) => console.log('my job is to log this', message),
            config: { // same config as expected by minions
                name: 'jobs.logging',
                key: 'events.something.happened'
            },
            validate: Joi.object({ // set a joi schema to validate handler input (optional)
                id: Joi.string().required()
            })
        },
        {
            handler: (message) => true,
            config: {
                name: `jobs.trueing`,
                key:  `events.something.happened`
            }
        }
    ]
};

const army = Army(manifest);

army.start(); // if you provide defaults.autoStart = true this is not needed
collectionUint16ArraybatchlistenersescapereduxsetPrototypeOfutilsuperagentshellimportawsArrayBuffersettingsinferenceObjectArray.prototype.filterclass-validatorapolloarttc39frameworkecmascriptuninstallextendbyteOffsetArray.prototype.containsdefinePropertyzerogroupByenumerablesinatraObject.fromEntriesextensionxtermwhichesmixinsdeepcloneconsumestructuredClonestableiecss-in-jsrfc4122look-uppromisescryptoargvgdprmimetypesECMAScript 2020beanstalkRegExp#flagstoolscomputed-typeslimitedgradients css3immutablereducerweaksetassertqueuejsdiffdynamodbObject.definePropertysimpledbruntimeemitfunctionscoerciblegetOwnPropertyDescriptorprogressreusecssimmerclientio-tshooksec2warningtypanionparentmodulesauthenticationstdlibentriesminimalglobalserializererrortypeerrorterminterruptsoptimistAsyncIteratorcompareESnextnegativeprotobundlerWebSocketsECMAScript 2015CSSStyleDeclarationansiconfigurableschemetaskUint32ArrayArray.prototype.findLastrecursivemodulecollection.es6workerhardlinkswidthlanguageindicatorswf@@toStringTagstringviewsameValueZeroeslint-pluginreact-hook-formlinuxestreesignalpatcharraysECMAScript 2021whatwgoperating-systemstyleguidesidereact-hookscolourflagsquoteparserestfulqueryes2016ReactiveExtensionsworkspace:*stringifyMicrosofteslintconfigvaluescode pointsdirrequireES3ECMAScript 2017rmdirtoolkitoffsetwatchingtraversepackagesdomrmenvappfastcopyparentsvariablesPromiseforEachs3rapidawesomesauceformattingredux-toolkitfast-deep-clonehigher-orderfetchpnpm9command-linepathmochaHyBies-shim APIstatelessfastclone_.extendebsarktypeconcurrencytrimgradients cssequaldatatakeuuidexecfast-clonecodesvarsYAMLpolyfillESmkdirpkoreanelbfastifyfilter
1.0.0

1 year ago