Shopify / ghostferry

The swiss army knife of live data migrations
https://shopify.github.io/ghostferry
MIT License
694 stars 65 forks source link

Invoke custom scripts from webui #267

Closed Manan007224 closed 3 years ago

Manan007224 commented 3 years ago

Based on https://github.com/Shopify/ghostferry/pull/213

With this PR we can run a custom script with the push of a button within the web ui as follows:

Screen Shot 2021-03-26 at 1 53 55 PM

The script statuses can be returned in json format when querying the api/status endpoint. The output looks like :-

"CustomScriptStatuses": {
    "Custom Script 1": {
      "Name": "Custom Script 1",
      "Status": "success",
      "Logs": "hello world 1\nhello world 1\nhello world 1\nhello world 1\n",
      "ExitCode": 0,
      "Running": false
    },
    "Custom Script 2": {
      "Name": "Custom Script 2",
      "Status": "success",
      "Logs": "hello world 2\nhello world 2\nhello world 2\nhello world 2\n",
      "ExitCode": 0,
      "Running": false
    }
  }

Restrictions :-