def alert_spud(self, item): params = dict(item) params['title_tmpl'] = spud_title_tmpl params['summary_tmpl'] = spud_summary_tmpl spud_date = item.get('well_spud_date', date.today()) params['date'] = convert_fuzzy_dt(spud_date) for alert in self.create_feed_entry(params): yield alert
def alert_well_status(self, item): params = dict(item) params['title_tmpl'] = well_status_title_tmpl params['summary_tmpl'] = well_status_summary_tmpl status_date = item.get('well_status_date') params['date'] = convert_fuzzy_dt(status_date) if status_date else None for alert in self.create_feed_entry(params): yield alert
def alert_permit_status(self, item): params = dict(item) if item['permit_status'] == 'APPROVED': params['title_tmpl'] = approved_permit_title_tmpl params['summary_tmpl'] = approved_permit_summary_tmpl else: params['title_tmpl'] = permit_status_title_tmpl params['summary_tmpl'] = permit_status_summary_tmpl params['date'] = convert_fuzzy_dt(item['permit_status_date']) for alert in self.create_feed_entry(params): yield alert