Code Monkey home page Code Monkey logo

triggerdotdev / trigger.dev Goto Github PK

View Code? Open in Web Editor NEW
7.2K 33.0 393.0 60.94 MB

Trigger.dev is the open source background jobs platform for TypeScript.

Home Page: https://trigger.dev/changelog

License: Apache License 2.0

JavaScript 1.17% Shell 0.12% Dockerfile 0.13% TypeScript 97.28% CSS 0.26% PLpgSQL 0.20% Astro 0.13% HTML 0.01% Svelte 0.01% Jinja 0.66% Smarty 0.05%
automation events orchestration scheduler background-jobs integrations nextjs serverless hacktoberfest

trigger.dev's People

Contributors

abhi1992002 avatar akhill10 avatar alexandredev3 avatar alexdanilowicz avatar arika0093 avatar ashutosh-bhadauriya avatar chigala avatar d-k-p avatar dylanrod21 avatar ericallam avatar github-actions[bot] avatar hmacr avatar hugomn avatar jemiluv8 avatar kaf-lamed-beyt avatar kritik-j avatar lirantal avatar mariusvilholm avatar matt-aitken avatar neo773 avatar nicktrn avatar ologbonowiwi avatar ramk777-stack avatar rishi-raj-jain avatar rutam21 avatar samejr avatar shelar1423 avatar sshari avatar teddarific avatar yashug avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

trigger.dev's Issues

Create @trigger.dev/nextjs adapter

Create an adapter for using Trigger.dev in a next.js project. Something like this:

import { Trigger, EntryPoint, customEvent } from "@trigger.dev/sdk";
import { createHandler } from "@trigger.dev/nextjs";

const entryPoint = new EntryPoint({
  apiKey: process.env.TRIGGER_API_KEY,
});

new Trigger({
  id: "my-workflow",
  name: "My workflow",
  logLevel: "debug",
  on: customEvent({ name: "user.created" }),
  run: async (event, ctx) => {
    await ctx.logger.info("Inside the smoke test workflow, received event", {
      event,
      myDate: new Date(),
    });

    return { foo: "bar" };
  },
}).register(entryPoint);

const handler = createHandler(entryPoint);

export default handler;

Platform simplification

Remove services and 3rd party dependencies, including Apache Pulsar, in favor of solutions that use PostgreSQL (like Graphile Worker). This is will include removing services such as the integrations service and the websocket service.

How to deploy to render.com?

Hey Trigger team

I'm deploying to Render web service, and deploy to Render failed because it will do a health check (returns 2xx status for success) when deploying, since Trigger doesn't listen on any port, the check will always fail. You can read more here and you can't disable the health check.

Thanks

Supabase Integration

Hi, I see you guys have a example of using supabase trigger at your home page. Just wondering if you have a example code or supabase integration coming?

Thanks!

BUG: Minor bug with OAuth Connection buttons

This is not a major issue, but when you click on an Oauth Connection button on the API Integrations page and cancel the request and click on another OAuth button (or a nav button), it seems to retain the previous connection state resulting in the previous integration popup firing.

I haven't had a chance to dive into it, but seems to a be a issue with ConnectOAuthButton when it catches an error from a cancelled request -

} catch (error: any) {
console.error(
`There was an error in the OAuth flow for integration "${error.providerConfigKey}" and connection-id "${error.connectionId}": ${error.error.type} - ${error.error.message}`,
error
);
}
},
[completeConnectionFetcher]
);

See:

Screencast.from.2023-02-03.13-40-18.webm

Trigger executions using HTTP instead of websockets

This is an initial tracer bullet issue to get Jobs executing over HTTP. Work that will need to be done:

  • Create the new data models necessary (Jobs, Endpoints, etc.)
  • Create a new API for registering endpoints
  • Create the client side API for registering jobs
  • Creating the job records when an endpoint is registered
  • Sending a request to the client when a custom event is sent to ./api/v3/events
  • API for creating executions from the client
  • Run an execution over http

EntryPoint publishing

Since live deployments will no longer automatically connect to trigger.dev to self-register triggers, we'll need to allow developers to "publish" an entry point to live (and enter a hostname and path). During the publishing process, the trigger.dev platform will make an HTTP request to the live entry point and attempt to gather information about all the triggers associated with the entry point. It will then "publish" those triggers to live on the platform side, and do any setup required for each trigger to work. Once each trigger is published, then the version of the trigger found in the live entry point will be aliased to "live", and any new changes to the trigger will need to have a version number > the live version

Expose an API to access data about workflows and workflow runs

Allow customers to be able to access workflow data through an API. Some potential API endpoints:

  • GET Paginated list of workflows
  • GET paginated list of workflows runs with status
  • GET individual workflow run log
  • Webhook for when a workflow run succeeds, fails

Self-hosting

Simplify the platform and make it much easier to self-host

require esm error

Follow the steps

  1. npx create-trigger@latest blank-starter
  2. yarn
  3. yarn build
  4. yarn start

And I got

Error [ERR_REQUIRE_ESM]: require() of ES Module node_modules/terminal-link/index.js from /node_modules/@trigger.dev/sdk/dist/index.js not supported.

Create MailerSend triggers and actions

Hello to the Trigger.dev team!
I'm Agathe Brusset, project manager of MailerSend, a solution to send transactional emails, SMS and verify emails addresses. We would love to connect MailerSend to Trigger.dev. Would you consider adding MailerSend as an email and SMS provider?

Please find more details on our website: www.mailersend.com, API documentation and our NodeJS SDK.

Let us know when you create an account so we can allow you to test our features.

Regards,
Agathe Brusset

New Task API

Tasks are the new abstraction for a single unit of work, and can be completely configured and controlled via clients through the Task API. Tasks can also have subtasks, which allows for composable task hierarchies

Integrate pull request preview environments

Is your feature request related to a problem? Please describe.
I would like to support trigger.dev by implementing Uffizzi preview environments.
Disclaimer: I work on Uffizzi.

Uffizzi is a Open Source full stack previews engine and our platform is available completely free for trigger.dev (and all open source projects). This will provide maintainers with preview environments of every PR in the cloud, which enables faster iterations and reduces time to merge. You can see the open source repos which are currently using Uffizzi over here

Uffizzi is purpose-built for the task of previewing PRs and it integrates with your workflow to deploy preview environments in the background without any manual steps for maintainers or contributors.

We can go ahead and create an Initial PoC for you right away if you think there is value in this proposal.

runOnce doesn't get re-run on server restart

If a runOnce task doesn't complete and your server goes down, it doesn't retry when the server is back up.

run: async (event, ctx) => {
    const { videoId } = event;
    const result = await ctx.runOnce(videoId, async (idempotencyKey) => {
      await new Promise((r) => setTimeout(r, 10000));
      return "finished";
    });
    return { result };
  }

This does not restart if I kill the server mid-way. It just console.logs this when the server is back up:
[trigger.dev] Run cldzype0* complete ๐Ÿƒ [render-video]

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.