-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Event System Overhaul & Cleanup #539
Open
jahjedtieson
wants to merge
13
commits into
develop
Choose a base branch
from
feature/event-update
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Prepare for Job events * Prepare to replace hard-coded Workflow and Job events with more generic events, implemented the event system itself (instead of in the job and worklow systems) Events: * Simplified IEventData, removing Key generic parameter * Renamed eAuditType.eSceneQCd to eAuditType.ePubSceneQCd, to match naming conventions elsewhere * Initial, WIP versions of EventConsumerJob and EventConsumerWF * Added eJob and eWF eEventTopic's * Added eJob* and eWF* eEventKey's * Modified IEventEngine, replacing createConsumer() with registerConsumer() and unregisterConsumer() * Modified EventEngine, making it clear that we create a set of system consumers, one per event topic, and then register those via registerConsumer()
* Create a default event producer; expose it's send() method as a method of IEventEngine; this allows event publication without creation of an EventProducer. * Add eWFGenerateSceneDownloads event key * Remove IEventConsumer.poll, which was unused, and unnessarily complex Jobs: * Record Cook "step" during polling. When it changes from our previously recorded "Step", send an eJobUpdated event * Replace JobPackrat.updateEngines() with new sendEvent(), using events to inform the WorkflowEngine and JobEngine of job status changes * Replaced IJobEngine.jobCompleted by making the JobEngine an EventConsumer for Job events. Use terminating statuses (done, error, cancelled) to clean up the job map Workflows: * Replace IWorkflowEngine.jobUpdated(), .event(), and .generateSceneDownloads() with actions initiated by job events. * Transform WorkflowEngine into a Job and Workflow Event consumer Cache & Data: * Removed vocabulary set and vocabulary for eWorkflowEvent Collections: * Use events to initiate scene download generation, instead of direct calls to the workflow engine GraphQL: * Use events to send the workflow ingest object notification Storage: * Use events to send the workflow ingest object notification from AssetStorageAdapter DBAPI: * Add "Step" field to JobRun, indicating the current step of a running job as received from Cook
* Used `npx madge --circular --extensions ts ./` to identfy circular dependencies in our code * Eliminated these through a combination of: - Using interfaces, where possible - Extracting selected code into separate files, which could then be imported directly without introducing the circ. dep. - Use forward declarations N.B. regressions tests are failing!
* Replace partial class definitions with base classes to avoid circular dependencies: * Move EdanCollection.computeLicenseInfo to PublishScene.computeLicenseInfo * Declare EventEngine.receive in EventEngineBase abstract class * Move Downloader.httpRoute to RouteBuilder.httpRoute * Import SitemapGenerator's real definition in download.ts * Declare JobEngine.sendJobEvent in JobEngineBase abstract class
EMaslowskiQ
force-pushed
the
develop
branch
2 times, most recently
from
May 13, 2024 15:01
008e5d6
to
aa7535c
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DB Update Required
This submission replaces hard-coded Workflow and Job events with more generic events, implemented in the event system itself (instead of in the job and worklow systems). We also lay the ground work for Job events; consumers of these events can take action as event status changes, such as updating a real-time display of Cook job status in the Packrat UI.
Events:
Jobs:
Workflows:
Cache & Data:
Collections:
GraphQL:
Storage:
DBAPI:
HTTP:
Test:
Build:
npx madge --circular --extensions ts ./
to identfy circular dependencies in our code