check payload for sickchill
This commit is contained in:
parent
c4c1ace54f
commit
371edb9f02
1 changed files with 22 additions and 18 deletions
|
@ -42,6 +42,7 @@ class SickChillAPI(object):
|
|||
sxe = f'S{show.season:0>2}E{show.episode:0>2}'
|
||||
hash_id = hashit(f'{self.server.id}{show.show_name}{sxe}')
|
||||
missing_types = [(0, 'future'), (1, 'later'), (2, 'soon'), (3, 'today'), (4, 'missed')]
|
||||
try:
|
||||
influx_payload.append(
|
||||
{
|
||||
"measurement": "SickChill",
|
||||
|
@ -60,5 +61,8 @@ class SickChillAPI(object):
|
|||
}
|
||||
}
|
||||
)
|
||||
except IndexError as e:
|
||||
self.logger.error('Error building payload for sickchill. Discarding. Error: %s', e)
|
||||
|
||||
if influx_payload:
|
||||
self.dbmanager.write_points(influx_payload)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue