Skip to content
This repository has been archived by the owner on Apr 11, 2022. It is now read-only.

Only create circulation_events on circulation managers #502

Open
courte opened this issue May 17, 2017 · 0 comments
Open

Only create circulation_events on circulation managers #502

courte opened this issue May 17, 2017 · 0 comments

Comments

@courte
Copy link
Contributor

courte commented May 17, 2017

Because CirculationEvents are tied in with core actions, they're being calculated on the metadata wrangler, resulting in lots of records and slower migration times. It would be nice to make event tracking optional outside of the circulation manager.

These are the types of events that are currently being tracked:

metadata=> select distinct type, count(id) from circulationevents group by type;
              type               | count
---------------------------------+--------
 distributor_availability_notify |  33286
 distributor_license_add         |  74282
 distributor_title_remove        | 109046
 distributor_check_out           | 985066
 distributor_title_add           | 392437
 distributor_license_remove      |  14224
 distributor_check_in            | 989866
 distributor_hold_place          | 650488
 distributor_hold_release        | 339769
(9 rows)

A brief glance suggests this might be happening in metadata_layer.py:CirculationData#license_pool and model.py:LicensePool#update_availability.

@courte courte changed the title Only create circulation_events on circulation servers Only create circulation_events on circulation managers May 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant