travis-ci/travis-worker — comment on commit dd066256825365e1a3dd5602f62c4016c0288109
File:  line 0
By michaelklishin:

Classes like worker do not have single responsibility because they aggregate other things. Database/broker connection is something that is centralized, inherently. So the best place to open channels I could find was in the worker. Worker instantiates its dependencies, those dependencies need separate channels (error handling happens on the channel level in AMQP).

Single responsibility principle here is a red herring. API-wise, worker does one thing (processes messages by orchestrating VMs, using travis-build classes and so on).