Backend workers for shotit. Four core workers of shotit: watcher, hasher, loader and searcher.
- watch file system changes and upload hash to shotit-media
- download video from shotit-media, hash, and upload to shotit-api
- download hash from shotit-api, deduplicate, and upload to milvus
- Node.js 16.x, 18.x
- ffmpeg 4.x
- java (openjdk 1.8.0)
- git
- pm2
Install Prerequisites first, then:
git clone https://github.com/shotit/shotit-worker.git
cd shotit-worker
yarn install
- Copy
.env.example
to.env
- Edit
.env
as appropriate for your setup, as is for the first time.
You can use pm2 to run this in background in cluster mode.
Use below commands to start / restart / stop server.
yarn start
yarn stop
yarn reload
yarn restart
yarn delete
yarn logs
To change the number of nodejs instances, edit ecosystem.config.json