Wrap raw pubnub messages in a metadata object containing:
- time
- our hostname
- our pid
- any inferred information
Plus make a message-less log write on startup so we know where there might be gaps.
Also do more error handling so that we don't completely lose messages on error.
Which also records all pubnub messages for archival to a file SEGMENTS/pubnub-log.json.
We ran this for most of last year, but not as part of wubloader.
- Move sheets API into common dir, since multi use
- Live download from Google Sheets using Config
- Falls back on old schedule if new one can't be downloaded for some reason
This is mainly a problem with groups_by_shift which will be set
even for negative hours that aren't on the schedule.
This causes notification spam as people move in and out of groups.
This feature is intended for implementing a "current wub wrangler" group, which:
a) Isn't on the schedule
b) Can't be put on the schedule as it would overlap with other duties
c) We don't want to announce in "starting/ending shift" messages.