Move create config functions out of the main delta-processor.ts file. Change some any types to more specific types. Define document structure better. Move prometheus logic out of processor class. Do not call logger directly, listen for events and log them. Change logger to more PSR-3 compliant style. Extract amqp connection into its own class. Create avro and mongo objects in factory.
This kicks the can down the road a bit since we do not have time atm the
investigate what changes in EventEmitter are causing the underlying
problem. With that said, the hope is to get rid of EventEmitter entirely.
DEV-6488
This was copied from a _very_ early version of node. The problem is that,
for reasons not yet investigated, Node v12's EventEmitter (at least when
extended by easejs) is causing data to be shared across instances.
This kicks the can down the road a little bit. The goal is to eventually
get rid of EventEmitter entirely.
Here's the script used to do the conversion in this commit:
git grep -l "require( 'events' )" -- src \
| while read f; do
path=$( sed 's|src/||;s|[^/]\+|..|g' <<< "$(dirname "$f")" )
sed -i "s|require( 'events' )|require( '$path/events' )|" "$f"
done
tsc handles its own incremental builds, and if a file is removed, it isn't
always regenerated. This resulted in a bad distribution being generated and
published to npm.
I accidentally changed id=>after when prototyping data for the _new_
deferred rating (not yet written). There were no tests for this code, which
was originally written in July of 2012 (see private lovullo.git repo), so it
was not caught until QA.
This only replaces the callbacks at the highest level and starts to move
toward proper error handling. The private methods do not yet properly
propagate errors.
This adds ratedata to the quote collection. We use the existing saveQuote
method so that this operation is atomic. We're also continuing to save to
the bucket for now so as not to break existing code, but the intent in the
future will be to remove all but necessary data that should be exposed to
the client.
This also gets rid of the RatingServiceStub module, which is not used by
anything else. I suspect that I originally added it to be shared by traits,
but that's no longer going to be the case (and the only remaining trait is
unfortunately untested atm, and will be going away).
I had forgotten an interface exists, and this will be needed for the next
commit. Unfortunately it requires a bit of duplication with
MongoServerDao.d.ts, for now.
This was an adventure, and was also used as a peer programming exercise to
introduce TypeScript to other programmers in the office.
This class has far too many dependencies, which made this difficult. The
approach was to create .d.ts files for dependencies and wait on moving those
over for now, otherwise the task will never get done.
The RatingServicePublic trait was left as such for the time being; I was
able to work around a bug that was making it difficult to mix it into a
prototype.
There were no logic changes; this was just type refactoring.