mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 22:37:44 +00:00
Refactor activity names to use an enum instead of a string to avoid typos #147
This commit is contained in:
@@ -3,6 +3,7 @@ from datetime import datetime, timedelta
|
||||
import pytz
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
from core.enums import ActivityName
|
||||
from data.activity_ref import ActivityRef
|
||||
from data.alert import Alert
|
||||
from providers.alert.http_alert_provider import HTTPAlertProvider
|
||||
@@ -55,8 +56,8 @@ class BOTA(HTTPAlertProvider):
|
||||
alert = Alert(
|
||||
source=self.name,
|
||||
dx_calls=[dx_call],
|
||||
sig="BOTA",
|
||||
sig_refs=[ActivityRef(id=ref_name, sig="BOTA")],
|
||||
sig=ActivityName.BOTA,
|
||||
sig_refs=[ActivityRef(id=ref_name, sig=ActivityName.BOTA)],
|
||||
start_time=date_time.timestamp(),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user