Esempio n. 1
0
 def webinars(self):
     webinars = {}
     for ex in Exchange.async_exchange([self._future_ex, self._past_ex, self._sessioned_ex]):
         for that in ex.result:
             this = webinars.get(that.key)
             if this: this.merge(that)
             else: webinars[that.key] = that
     return sort(webinars.values())
Esempio n. 2
0
 def _bulk_settings_fill(self):
     from webinars_web.webinars import models as wm
     hubs_settingshubs = [(h, SettingsHub(id=h.id, api_key=settings.HUBSPOT_API_KEY, env=settings.API_ENV)) for h in wm.Hub.objects.all()]
     Exchange.async_exchange([hs[1].settings.scope(domains=True)._settings_ex for hs in hubs_settingshubs])
     for h,s in hubs_settingshubs:
         h._ensure_settings_info(s)