Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Split out get_events and co into a worker store #2902

Merged
merged 5 commits into from
Feb 23, 2018

Conversation

erikjohnston
Copy link
Member

The diff for synapse.storage.events is a bit silly, all I've done is move the functions up the file.

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm modulo _event_persist_queue

and ©

EVENT_ORIGIN_SERVER_TS_NAME = "event_origin_server_ts"
EVENT_FIELDS_SENDER_URL_UPDATE_NAME = "event_fields_sender_url"

class EventsWorkerStore(SQLBaseStore):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't _event_persist_queue be in the EventsStore?


def __init__(self, db_conn, hs):
super(EventsStore, self).__init__(db_conn, hs)
self._clock = hs.get_clock()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this appears to be redundant, fwiw.

@richvdh
Copy link
Member

richvdh commented Feb 22, 2018

oh, I wonder if it would be worth putting EventsWorkerStore in a separate python file. events.py is pretty huge.

@richvdh richvdh assigned erikjohnston and unassigned richvdh Feb 22, 2018
@erikjohnston
Copy link
Member Author

I've split out the events into two files, do you want to take a quick look before I merge?

@erikjohnston erikjohnston merged commit 50e8657 into develop Feb 23, 2018
@erikjohnston erikjohnston deleted the erikj/split_events_store branch March 5, 2018 15:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants