This saves a lot of time for large classifiers by waiting to invoke it until
after some initial bucket setup has been done. In particular, initQuote.
DelayedStagingBucket exists to try to limit the number of events that are
kicked off. In this case, initQuote typically uses setCommittedValues,
which DelayedStagingBucket does not override. However, overriding it did
not provide a whole lot of benefit, since initQuote also calls
getDataByName, which forces DelayedStagingBucket to flush so that hooks can
run validations and such.
The last step in Client#_changeQuote is to force the classifier to run, so
this should be safe, unless calculated values happen to use classification
results, in which case they'll be momentarily wrong and then immediately
updated after the classifier runs.
The `"(),:;<>@[\]`` are allowed in the "local-part" of an email address
under certain circumstances, but our regex is not checking those
circumstances. It is better if we do not allow them until we improve
validation.
Deltas must be applied in reverse to reproduce the state of the bucket or
rate data at that point in time, which is then paired with the delta that
will transform it into the previous state.
getDeltas should be encapsulated. It looks like it was public for the sake
of the tests, and its behavior can be inferred by looking at the result of
processing.
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 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