summary refs log tree commit diff
path: root/synapse/appservice/scheduler.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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