* chore(plugin-server): remove piscina workers
Using Piscina workers introduces complexity that would rather be
avoided. It does offer the ability to scale work across multiple CPUs,
but we can achieve this via starting multiple processes instead. It may
also provide some protection from deadlocking the worker process, which
I believe Piscina will handle by killing worker processes and
respawning, but we have K8s liveness checks that will also handle this.
This should simplify 1. prom metrics exporting, and 2. using
node-rdkafka.
* remove piscina from package.json
* use createWorker
* wip
* wip
* wip
* wip
* fix export test
* wip
* wip
* fix server stop tests
* wip
* mock process.exit everywhere
* fix health server tests
* Remove collectMetrics
* wip
* rename legacy references to queue to more appropriate worker terminology
* rename startJobsConsumer -> startGraphileWorker, no-op refactor
* add back enqueue success and failure metrics
* fix mock import
* fix test for good
* Extract calculation method from vm/lazy.ts
* Add tests for capabilities.ts
* Move capabilities.ts under vm which it's more closely tied to
* Add (blank) capabilities object to hub
This will be used to check whether to start certain jobs
* Don't start plugin scheduled tasks unless have the capabilities
* scheduledTasks => pluginScheduledTasks in capabilities
* Cancel all jobs on schedule exit
* Remove capabilities code from services/schedule.ts
* scheduleControl => pluginScheduleControl
* Flip conditional
* Do less manual cleanup
* Add test for stopping node-schedule at exit
* Move cancelAllScheduledJobs
* Test capabilities check in server.test.ts
* Capabilities check for jobs
* Improve comment
* Rename method
* Rename jobs => processJobs
* Fix failed import
* show last event ingested timestamp in system status
* wip plugin server healthcheck endpoint
* plugin server health endpoint
* fix readme prettier issue
* update tests
* move server.listen
* fixes, tests
* longer staleness default
* change endpoint to _health