Publish redis-worker and add graceful shutdown manager (#1810)
* add shutdown manager * update ai test instructions * add shutdown timeout to redis-worker * move redis worker to packages * add unregister method * prep for publishing package * fix types * update ai files * fix cursor terminal links * prevent overly friendly ids * use structured logger * use unique shutdown handler names * rework suspend completion * add trycatch util * rework suspend restore * add http server metrics * add missing prom-client to core * add prom metrics to redis worker * bundle redis-worker * fix esm/cjs interop * remove proxy from changeset ignore and add supervisor * add pause to prerelease script for any manual edits * unregister the correct handler and add early detection * small change to http handler return * fix worker tests * fix shutdown manager tests
This commit is contained in:
@@ -35,6 +35,17 @@ else
|
||||
echo "Git status is clean. Proceeding with the script.";
|
||||
fi
|
||||
|
||||
# From here on, if the user aborts the script, we will clean up the git stage
|
||||
git_reset() {
|
||||
git reset --hard HEAD
|
||||
}
|
||||
abort() {
|
||||
echo "Aborted. Cleaning up..."
|
||||
git_reset
|
||||
exit 1
|
||||
}
|
||||
trap abort INT
|
||||
|
||||
# Run your commands
|
||||
# Run changeset version command and capture its output
|
||||
echo "Running: pnpm exec changeset version --snapshot $version"
|
||||
@@ -48,6 +59,8 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
read -e -p "Pausing for manual changes, press Enter when ready to continue..."
|
||||
|
||||
echo "Running: pnpm run clean --filter \"@trigger.dev/*\" --filter \"trigger.dev\""
|
||||
pnpm run clean --filter "@trigger.dev/*" --filter "trigger.dev"
|
||||
|
||||
@@ -59,11 +72,9 @@ read -p "Do you wish to continue? (y/N): " prompt
|
||||
if [[ $prompt =~ [yY](es)* ]]; then
|
||||
pnpm exec changeset publish --no-git-tag --snapshot --tag $version
|
||||
else
|
||||
echo "Publish command aborted by the user."
|
||||
git reset --hard HEAD
|
||||
exit 1;
|
||||
abort
|
||||
fi
|
||||
|
||||
# If there were no errors, clear the git stage
|
||||
echo "Commands ran successfully. Clearing the git stage."
|
||||
git reset --hard HEAD
|
||||
git_reset
|
||||
|
||||
Reference in New Issue
Block a user