Hi, this issue has been posted about before like here (Application starting twice), but I have a background worker that on the first deploy is getting run twice (i.e. deploy succeeds, it calls the entry script, which is successful, and is long-lived, then after processing one event, it runs the whole startup command again
This is what my yaml file look likes
- name: name
type: worker
env: node
plan: starter
branch: staging
buildCommand: cd backend && npm install && npx prisma generate --schema=./packages/shared/prisma/schema.prisma && npx prisma migrate deploy --schema=./packages/shared/prisma/schema.prisma && npm run build:<name>
startCommand: cd backend && npm run start:<name>
For a little more context, my background worker is a service which opens a websocket and listens for emitted events and weirdly, this second run only happens whenever the first event is picked up from the websocket and never after that.
any ideas what is going and how to fix it, happy to provide more context/info