Skip to content
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

WIP: Dailylog optimization #18

Merged
merged 20 commits into from
Jul 19, 2022
Merged

WIP: Dailylog optimization #18

merged 20 commits into from
Jul 19, 2022

Conversation

vokimon
Copy link
Member

@vokimon vokimon commented Jul 18, 2022

Call log tends to grow and makes callinfo to be slow. This PR tries to reorganize the call logging so that it is more lean.

Commits are granular and contain full explanation so that it can be reviewed commit by commit.

The configured parameters is the dailycalls file
but CallRegistry takes its parent dir for
the rest of the managed files.

This commit still receives the dailycalls configuration
but computes the parent in the constructor
and then just relies on the parent.
Instead of configure a concrete callinfo log file,
configure the path. callregistry relies now on that file.
This way call log and annotation log are even more
closer and we avoid handling both types of index.
Sandwich criteria, pbxsends us extensions, internally
we manage just tomatic users.
to be consistent with the semantics of the former
commit. Indeed tests used user names as well.
@vokimon vokimon requested a review from marta197 July 18, 2022 19:12
@vokimon vokimon self-assigned this Jul 18, 2022
This fixes a rare bug that stores twice the same annotation
when opened in two different windows.

Also prepares the way to be able to write
unannotated calls in the case registry.
Having a single entry point from the api
The case uploader still could identify unnanotated by checking the
reason
Field mapping already done inside annotateCall, now centralized and
hidden.
There is no need to codify the color in the cookie
if we can obtain it from Tomatic object.

On load, person info might not available yet,
so the conditional keeps ups safe
By centralizing this op, it will be easier
to change what it does
whoAreYou was a quite messy name provided that
myName and tellMeWhoIAm are spread around with
quite different semantics (one gives the user cookie
and the other the user id)
Adding a test to ensure we can refactor without losing that
functionality test_updateCall_limitedSize_forgetsOlder

Indeed it raised the bug that made the call log grow
forever.
Assigning to a local var does not update the original list.
Rationale: You never have to load calls from different persons.
Just separate them and thus ensuring that they only
have 20 calls as much to parse. Far from the 1400 for 70 users
or the 8800 currently in production (because the previous fixed bug)
@vokimon vokimon merged commit 8b22f3f into master Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant