With this PR we can run a custom script with the push of a button within the web ui as follows:
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 :-
There is no continous streaming of the script stdout/stderr. For seeing the latest script logs/status one needs to refresh the control-server webui page.
The script cannot be killed once it starts running unless we terminate the ghostferry process.
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:
The script statuses can be returned in json format when querying the
api/status
endpoint. The output looks like :-Restrictions :-