Skip to content

hasura/cleanup-scheduled-triggers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

cleanup-scheduled-triggers

This repo contains a script that deletes all scheduled events that have a webhook URL set to a specific value. This is useful when you want to clean up all scheduled events that were created for a specific webhook URL.

Requirements

  • Python 3
  • Requests library (pip3 install requests)

Setup

  1. Download the file delete_scheduled_event.py from this gist.

  2. Install the required libraries using pip:

    pip3 install requests

Usage

  1. Set up environment variables.

    • HASURA_ADMIN_SECRET: The admin secret for accessing the API endpoint.
    • HASURA_GRAPHQL_ENGINE_BASE_URL: The hostname of the API endpoint (e.g., if your graphql endpoint is https://capital-elk-82.hasura.app/v1/graphql, the value here will be https://capital-elk-82.hasura.app)
    • WEBHOOK_URL: Tpt fetches scheduled events in batches from the /v1/metadata endpoint.
  • It filters events with the webhook_conf value as the set WEBHOOK_URL environment variable and deletes them using their IDs.

Notes

  • Ensure there are no white spaces in the environment variables

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages