Skip to content

Commit

Permalink
Fix server not running in actions (#26)
Browse files Browse the repository at this point in the history
* chore: added debug check to process kill on post

* chore: trying to see if we can get pid another way

* chore: remove all the wierd stuff i did

* chore: try not doing process.exit in main

* chore: testing a run with fork instead of spawn

* feat: revert to cjs

* chore: removed semis inside bracket

* chore: adding back process.exit since it otherwise does not exit now

* chore: try with stdio ignore and no process.exit

* fix: fixed my stupidity

* chore: move back to esm

* fix: align formatting with base branch
  • Loading branch information
Mcbeer authored Feb 27, 2024
1 parent 916f419 commit 9d12530
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion action/main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const serverBinary = resolve(__dirname, './decay')

const decayProcess = spawn(serverBinary, [], {
detached: true,
stdio: 'ignore',
env: {
...process.env,
LOGS_DIRECTORY: LOGS_DIR,
Expand All @@ -23,4 +24,4 @@ Web server logs are being written at "${LOGS_DIR}"
`)

saveState(DECAY_PID_KEY, pid)
process.exit(0)
process.exit(0)

0 comments on commit 9d12530

Please sign in to comment.