summary refs log tree commit diff
path: root/synapse/appservice/scheduler.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add missing type hints to `synapse.appservice` (#11360)Patrick Cloke2021-12-141-30/+44
|
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-141-1/+0
| | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
* Bugbear: Add Mutable Parameter fixes (#9682)Jonathan de Jong2021-04-081-3/+3
| | | | | | | Part of #9366 Adds in fixes for B006 and B008, both relating to mutable parameter lint errors. Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>
* Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-161-1/+1
| | | | | | | - Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version
* Limit AS transactions to 100 events (#8606)Will Hunt2020-10-211-2/+16
| | | | | | | | | | | | | * Limit AS transactions to 100 events * Update changelog.d/8606.feature Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> * Add tests * Update synapse/appservice/scheduler.py Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
* Send some ephemeral events to appservices (#8437)Will Hunt2020-10-151-13/+35
| | | Optionally sends typing, presence, and read receipt information to appservices.
* Stop sub-classing object (#8249)Patrick Cloke2020-09-041-4/+4
|
* Convert appservice to async. (#7973)Patrick Cloke2020-07-301-29/+20
|
* Refactor the Appservice scheduler code (#5886)Richard van der Hoff2019-08-201-45/+65
|\ | | | | | | | | | | | | Get rid of the labyrinthine `recoverer_fn` code, and clean up the startup code (it seemed to be previously inexplicably split between `ApplicationServiceScheduler.start` and `_Recoverer.start`). Add some docstrings too.
| * Refactor the Appservice scheduler codeRichard van der Hoff2019-08-201-45/+65
| | | | | | | | | | | | | | | | Get rid of the labyrinthine `recoverer_fn` code, and clean up the startup code (it seemed to be previously inexplicably split between `ApplicationServiceScheduler.start` and `_Recoverer.start`). Add some docstrings too.
* | Avoid deep recursion in appservice recovery (#5885)Richard van der Hoff2019-08-201-18/+25
|/ | | | | | | | | | Hopefully, this will fix a stack overflow when recovering an appservice. The recursion here leads to a huge chain of deferred callbacks, which then overflows the stack when the chain completes. `inlineCallbacks` makes a better job of this if we use iteration instead. Clean up the code a bit too, while we're there.
* Replace returnValue with return (#5736)Amber Brown2019-07-231-2/+2
|
* Move logging utilities out of the side drawer of util/ and into logging/ (#5606)Amber Brown2019-07-041-1/+1
|
* Run Black. (#5482)Amber Brown2019-06-201-30/+20
|
* Run the AS senders as background processes (#4189)Richard van der Hoff2018-12-041-12/+24
| | | | This should fix some "Starting db connection from sentinel context" warnings, and will mean we get metrics for these processes.
* run isortAmber Brown2018-07-091-2/+2
|
* Merge remote-tracking branch 'origin/develop' into rav/use_run_in_backgroundRichard van der Hoff2018-04-271-11/+14
|\
| * Improve exception handling for background processesRichard van der Hoff2018-04-271-11/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were a bunch of places where we fire off a process to happen in the background, but don't have any exception handling on it - instead relying on the unhandled error being logged when the relevent deferred gets garbage-collected. This is unsatisfactory for a number of reasons: - logging on garbage collection is best-effort and may happen some time after the error, if at all - it can be hard to figure out where the error actually happened. - it is logged as a scary CRITICAL error which (a) I always forget to grep for and (b) it's not really CRITICAL if a background process we don't care about fails. So this is an attempt to add exception handling to everything we fire off into the background.
* | Use run_in_background in preference to preserve_fnRichard van der Hoff2018-04-271-6/+6
|/ | | | | | While I was going through uses of preserve_fn for other PRs, I converted places which only use the wrapped function once to use run_in_background, to avoid creating the function object.
* replace 'except:' with 'except Exception:'Richard van der Hoff2017-10-231-1/+1
| | | | what could possibly go wrong
* Preserve some logcontextsErik Johnston2016-08-241-3/+3
|
* Change name of metricMatrix2016-08-171-1/+1
|
* Move Measure block inside loopErik Johnston2016-08-171-9/+9
|
* Clean up _ServiceQueuerErik Johnston2016-08-171-31/+30
|
* Move the AS handler out of the Handlers object.Mark Haines2016-05-311-7/+7
| | | | | | Access it directly from the homeserver itself. It already wasn't inheriting from BaseHandler storing it on the Handlers object was already somewhat dubious.
* copyrightsMatthew Hodgson2016-01-071-1/+1
|
* Cap the time to retry txns to appservices to 8.5 minutesKegan Dougal2015-10-211-2/+2
| | | | | | | | | | | There's been numerous issues with people playing around with their application service and then not receiving events from their HS for ages due to backoff timers reaching crazy heights (albeit capped at < 1 day). Reduce the max time between pokes to be 8.5 minutes (2^9 secs) which is quick enough for people to wait it out (avg wait time being 4.25 min) but long enough to actually give the AS breathing room if it needs it.
* Fixes from PR commentsKegan Dougal2015-03-261-1/+2
|
* Implement ServiceQueuer with tests.Kegan Dougal2015-03-161-16/+30
|
* Replace EventGrouper for ServiceQueuer to move to push-based txns. Fix tests ↵Kegan Dougal2015-03-161-28/+33
| | | | and add stub tests for ServiceQueuer.
* Wrap polling/retry blocks in try/excepts to avoid sending to other ASes ↵Kegan Dougal2015-03-161-29/+39
| | | | breaking permanently should an error occur.
* Minor PR comment tweaks.Kegan Dougal2015-03-161-2/+2
|
* Fix remaining scheduler bugs. Add more informative logging.Kegan Dougal2015-03-101-30/+22
|
* Bug fixes whilst putting it all togetherKegan Dougal2015-03-091-1/+3
|
* Use seconds; start gluing in the AS scheduler into the AS handler.Kegan Dougal2015-03-091-2/+2
|
* Upper bound the backoff.Kegan Dougal2015-03-061-1/+3
|
* Apply clarity and docstringsKegan Dougal2015-03-061-1/+1
|
* Finish synapse.appservice.scheduler implementation.Kegan Dougal2015-03-061-51/+12
| | | | | With tests to assert behaviour. Not hooked up yet. Stub datastore methods not implemented yet.
* Add some loggersKegan Dougal2015-03-061-0/+10
|
* Flesh out more stub functions.Kegan Dougal2015-03-061-8/+29
|
* Add stub ApplicationServiceTransactionStore. Bootstrap Recoverers. Fill in ↵Kegan Dougal2015-03-061-7/+43
| | | | stub Transaction functions.
* Add more tests; fix bugs.Kegan Dougal2015-03-061-2/+2
|
* Start adding some testsKegan Dougal2015-03-061-10/+13
|
* Rejig structure given the appservice_handler already filters the correct ↵Kegan Dougal2015-03-061-59/+85
| | | | ASes to use.
* Minor tweaksKegan Dougal2015-03-051-7/+9
|
* Add stub architecture for txn reliability.Kegan Dougal2015-03-051-10/+111
|
* Add stub scheduler module for txn reliabilityKegan Dougal2015-03-051-0/+68