-
Notifications
You must be signed in to change notification settings - Fork 5
Conversation
This one is sort of weird since it gets called in server.ts
1c7bf40
to
43e6988
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I broadly agree. My only two notes are:
- I think it's a bit awkward that
src/celery/worker.ts
got pulled out of thecelery
directory intosrc/main/ingestion/celery-queue-worker.ts
, especially considering that thecelery
directory used to be a whole separate package. The analogy to the Kafka queue is good though. - Most of
src/server.ts
ended up insrc/main/pluginsServer.ts
, but not all of it. I think we should keep that file intact instead, as basically it's allPluginsServer
.
However in any case I'd wait for @mariusandra's input on this too before merging.
Thanks for the feedback. Both of these were motivated by trying to keep
|
Regarding these discussed points:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved. Some merge conflicts though.
…ver#262) * Move schedule.ts under src/main * Move queue.ts under src/main * Move kafka-queue logic under src/main * Move ingest-event file * Move web/server under main.ts * Move plugins code under src/worker * Move vm code under src/worker * Move celery worker under src/main * move process-event under src/worker This one is sort of weird since it gets called in server.ts * Move src/celery under src/shared * Move remaining src/ingestion under src/shared * move utils under src/shared * Move some top-level code under shared * Move main pluginsserver code under src/main * Fix typeerror in tests * Move createServer under src/shared * Rename celery worker to be ingestion-specific * Fix another package.json import * Fix process-event import
Overview
This PR moves code along the lines proposed in #261. I find it makes it much easier to follow the code flow - what code is being executed in workers, what in main threads and what everywhere.
No real behavioral changes here, just moving files. Some minor changes:
src/main/pluginsServer
andsrc/shared/server
src/main/ingestion/celery-queue-worker
. This avoids confusion withworker
threads.The eventual goal would be to make
src/shared
as tiny as possible and move everything else under specific subfolders.Resolves #47.
Commits
Checklist