Skip to content

Commit

Permalink
this works
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexGKim committed Oct 28, 2021
1 parent 37b6db6 commit 30a499c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ tom-antares
tom-fink
antares-client==1.1
fink-client~=2.0
tom-pittgoogle==0.1.6
19 changes: 18 additions & 1 deletion stream/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class EventAttributes(models.Model):
created = models.DateTimeField(auto_now_add=True)
modified = models.DateTimeField(auto_now=True)


class Alert(models.Model):
# target_id = models.ForeignKey(Target, on_delete=models.CASCADE)
topic = models.ForeignKey(Topic, on_delete=models.PROTECT)
Expand All @@ -52,3 +51,21 @@ class Meta:
indexes = [
models.Index(fields=['timestamp'], name='timestamp_idx'),
]

# class ElasticcAlert(models.Model):
# # target_id = models.ForeignKey(Target, on_delete=models.CASCADE)
# topic = models.ForeignKey(Topic, on_delete=models.PROTECT)
# events = models.ManyToManyField(Event)
# identifier = models.CharField(max_length=200)
# timestamp = models.DateTimeField(null=True, blank=True)
# coordinates = gis_models.PointField(null=True, blank=True)
# parsed_message = models.JSONField(default=dict)
# raw_message = models.JSONField(default=dict)
# parsed = models.BooleanField(default=False)
# created = models.DateTimeField(auto_now_add=True)
# modified = models.DateTimeField(auto_now=True)
#
# class Meta:
# indexes = [
# models.Index(fields=['timestamp'], name='timestamp_idx'),
# ]
2 changes: 1 addition & 1 deletion tom_desc/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@
'tom_alerts.brokers.scout.ScoutBroker',
'tom_alerts.brokers.tns.TNSBroker',
'tom_fink.fink.FinkBroker',
'tom_pittgoogle.pittgoogle.PittGoogleBroker',
'tom_pittgoogle.broker_stream_rest.BrokerStreamRest',
]

BROKERS = {
Expand Down

0 comments on commit 30a499c

Please sign in to comment.