0001-agent-notify-skip-tenants-that-were-not-deployed-wit.patch
hobo/agent/common/management/commands/hobo_notify.py | ||
---|---|---|
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 | 17 |
import json |
18 |
import os |
|
18 | 19 |
import sys |
19 | 20 |
import random |
20 | 21 | |
... | ... | |
42 | 43 |
def handle(self, *args, **kwargs): |
43 | 44 |
notification = self.load_notification(args) |
44 | 45 |
for tenant in TenantMiddleware.get_tenants(): |
46 |
if not os.path.exists(os.path.join(tenant.get_directory(), 'hobo.json')): |
|
47 |
continue |
|
45 | 48 |
with tenant_context(tenant): |
46 | 49 |
self.process_notification(tenant, notification) |
47 | 50 | |
48 |
- |