Git Product home page Git Product logo

lit-scheduled-tasks's Introduction

๐Ÿ”ฅ LIT Scheduled Tasks ๐Ÿ”ง

This repo provides scaffolding for running internal scheduled tasks on a CRON-like schedule.

โŒ Installation

Packages in this repository are currently not published to NPM; it is expected to be deployed as a worker to Heroku.

๐ŸŽฎ Usage

To prepare for either production usage or local development, you must install dependencies and build the packages.

pnpm install && pnpm build

For local development:

Note that local development uses dotenvx to load necessary environment vars from a .env file which must be located in the root directory of the repository to be loaded.

pnpm dev

For production:

Note that all environment variables for the worker process must be defined in the host environment. Production does not use dotenvx.

pnpm start

๐Ÿ“ฆ Packages

Package Purpose
lit-task-client Load and validate mongo credentials from env in a type-safe way, and produce a task client Agenda instance
lit-task-auto-top-up Task to mint capacity credit NFTs for a list of recipient addresses defined in JSON at a configured URL

๐Ÿ’ป Development

The repository is a mono-repo leveraging pnpm as the package manager, using pnpm workspaces. It requires Node v18+, it is recommended that you use nvm to select the correct node version via the included .nvmrc file.

  • Clone the repository
  • Enable Corepack using corepack enable
  • Install dependencies by executing pnpm install in the root of the repo
  • Build all packages by executing pnpm build in the root of the repo
  • Currently, you must manually rebuild packages that are referenced locally using workspace:* references after making changes, until unbuild stub issues with Typescript have been resolved. Reference issue: unjs/unbuild#370

lit-scheduled-tasks's People

Contributors

maximushaximus avatar gitaalekhyapaul avatar a1ttech avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.