Erik Johnston
4ce84a1acd
Change metric style
2016-06-03 13:49:16 +01:00
Erik Johnston
a7ff5a1770
Presence metrics. Change def of small delta
2016-06-03 13:40:55 +01:00
Mark Haines
70599ce925
Allow external processes to mark a user as syncing. ( #812 )
...
* Add infrastructure to the presence handler to track sync requests in external processes
* Expire stale entries for dead external processes
* Add an http endpoint for making users as syncing
Add some docstrings and comments.
* Fixes
2016-06-02 15:20:15 +01:00
Mark Haines
b153f5b150
Merge pull request #787 from matrix-org/markjh/liberate_presence_handler
...
Move the presence handler out of the Handlers object
2016-05-17 10:09:43 +01:00
Mark Haines
1a3a2002ff
Spell "domain" correctly
...
s/domian/domain/g
2016-05-16 19:17:23 +01:00
Mark Haines
e168abbcff
Don't inherit PresenceHandler from BaseHandler, remove references to self.hs from presence handler
2016-05-16 19:08:40 +01:00
Mark Haines
3b86ecfa79
Move the presence handler out of the Handlers object
2016-05-16 18:56:37 +01:00
Erik Johnston
08dfa8eee2
Add and use get_domian_from_id
2016-05-09 10:36:03 +01:00
Erik Johnston
56b5e83e36
Reduce database inserts when sending transactions
2016-05-06 11:20:18 +01:00
Mark Haines
7a38612620
Remove another unused function from presence
2016-03-17 11:54:19 +00:00
Mark Haines
673c96ce97
Remove dead code left over from presence changes
2016-03-17 11:03:47 +00:00
Erik Johnston
2a78dac60d
Merge pull request #612 from matrix-org/erikj/cache_size
...
Add environment variable SYNAPSE_CACHE_FACTOR, default it to 0.1
2016-03-02 14:36:10 +00:00
Mark Haines
60a0f81c7a
Add a /replication API for extracting the updates that happened on
...
synapse
This is necessary for replicating the data in synapse to be visible to a
separate service because presence and typing notifications aren't stored
in a database so won't be visible to another process.
This API can be used to either get the raw data by requesting the tables
themselves or to just receive notifications for updates by following the
streams meta-stream.
Returns updates for each table requested a JSON array of arrays with a
row for each row in the table.
Each table is prefixed by a header row with the: name of the table,
current stream_id position for the table, number of rows, number of
columns and the names of the columns.
This is followed by the rows that have been added to the server since
the requester last asked.
The API has a timeout and is hooked up to the notifier so that a slave
can long poll for updates.
2016-03-01 14:49:41 +00:00
Erik Johnston
910fc0f28f
Add enviroment variable SYNAPSE_CACHE_FACTOR, default it to 0.1
2016-03-01 12:56:39 +00:00
Erik Johnston
b5f77eb12a
Check presence token interval is less than 100, rather than the token itself
2016-02-23 15:47:37 +00:00
Erik Johnston
e3e0ac6ec7
Merge pull request #602 from matrix-org/erikj/presence
...
Change the way we figure out presence updates for small deltas
2016-02-23 15:18:41 +00:00
Erik Johnston
13f86c3489
Handle get_all_entities_changed returning None
2016-02-23 15:05:37 +00:00
Erik Johnston
6e0209112b
Add comments
2016-02-23 14:57:45 +00:00
Erik Johnston
c77dae7a1a
Change the way we figure out presence updates for small deltas
2016-02-23 14:54:40 +00:00
Erik Johnston
a7b2ce32f7
Merge pull request #600 from matrix-org/erikj/presence
...
Measure PresenceEventSource.get_new_events
2016-02-23 14:54:26 +00:00
Erik Johnston
02e928cf9b
Don't include defer.returnValue in Measure block
2016-02-23 14:52:16 +00:00
Erik Johnston
56a94ccd9e
Measure PresenceEventSource.get_new_events
2016-02-23 14:52:16 +00:00
Erik Johnston
138c405974
Pick up currently_active across federation
2016-02-23 10:40:11 +00:00
Erik Johnston
3dbaeef58c
Correctly filter states
2016-02-19 12:27:35 +00:00
Erik Johnston
42ac5f0c1a
Only send presence updates to remote hosts if user is ours
2016-02-19 12:19:56 +00:00
Erik Johnston
24d9f2c140
Add Measures to presence
2016-02-19 11:50:48 +00:00
Erik Johnston
4a95eb0a12
Add presence metric
2016-02-19 11:32:04 +00:00
Erik Johnston
be799453aa
Remove spurious extra metrics
2016-02-19 11:29:33 +00:00
Erik Johnston
929cb0ed7d
Don't set currently_active for remote presence
2016-02-19 10:58:27 +00:00
Erik Johnston
5f4eca3816
More metrics
2016-02-19 10:21:41 +00:00
Erik Johnston
5614b4dafb
Add presence metrics
2016-02-19 09:50:54 +00:00
Erik Johnston
48b652bcbe
Remove invalid arg.
2016-02-18 14:57:09 +00:00
Erik Johnston
b4796a62ee
Add unit test
2016-02-18 11:52:33 +00:00
Erik Johnston
fe95f2217c
Add stuff pulled from the DB to the cache
2016-02-18 10:26:24 +00:00
Erik Johnston
8351538873
PEP8
2016-02-18 10:12:12 +00:00
Erik Johnston
112283e230
Prefix TS fields with _ts
2016-02-18 10:11:43 +00:00
Erik Johnston
b31ec214a5
Remove status_msg when going offline. Don't offline -> online if you send a message
2016-02-18 09:54:08 +00:00
Erik Johnston
114b929f8b
Check presence state is a valid one
2016-02-18 09:16:32 +00:00
Erik Johnston
ddca9c56fc
Move if statement
2016-02-18 09:11:53 +00:00
Erik Johnston
58371fa263
Comment
2016-02-18 09:09:50 +00:00
Erik Johnston
c229c87398
Remove spurious comment
2016-02-17 15:48:29 +00:00
Erik Johnston
e5999bfb1a
Initial cut
2016-02-17 15:40:50 +00:00
Erik Johnston
2c1fbea531
Fix up logcontexts
2016-02-08 14:26:45 +00:00
Daniel Wagner-Hall
d83d004ccd
Fix flake8 warnings for new flake8
2016-02-02 17:18:50 +00:00
Matthew Hodgson
6c28ac260c
copyrights
2016-01-07 04:26:29 +00:00
Mark Haines
a9526831a4
Wrap calls to distributor.fire in appropriately named functions so that static analysis can work out want is calling what
2015-12-01 20:53:04 +00:00
Mark Haines
31069ecf6a
Rename presence_handler.send_invite to presence_handler.send_presence_invite to distinguish it from normal invites
2015-12-01 15:59:45 +00:00
Daniel Wagner-Hall
38d82edf0e
Allow guest users to join and message rooms
2015-11-10 16:57:13 +00:00
Daniel Wagner-Hall
ca2f90742d
Open up /events to anonymous users for room events only
...
Squash-merge of PR #345 from daniel/anonymousevents
2015-11-05 14:32:26 +00:00
Mark Haines
987803781e
Fix some races in the synapse presence handler caused by not yielding on deferreds
2015-10-09 19:59:50 +01:00