-
Notifications
You must be signed in to change notification settings - Fork 7
Alert-system polling #2584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Alert-system polling #2584
Conversation
0494e49 to
160d9c2
Compare
160d9c2 to
a582117
Compare
|
|
||
| class Connector(models.Model): | ||
| class ConnectorType(models.TextChoices): | ||
| GDACS_FLOOD = "GDACS_FLOOD", "GDACS_FLOOD" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to use IntegerChoices...
| USGS_EARTHQUAKE = "USGS_EARTHQUAKE", "USGS_EARTHQUAKE" | ||
|
|
||
| class Status(models.IntegerChoices): | ||
| SUCCESS = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 281 in 6231854
| class Status(models.IntegerChoices): |
|
|
||
| class Status(models.IntegerChoices): | ||
| SUCCESS = 1 | ||
| FAILURE = 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| FAILURE = 2 | |
| FAILED = 2 |
| last_success_run = models.DateTimeField(null=True, blank=True) | ||
| filters = models.JSONField(blank=True, null=True) | ||
|
|
||
| status = models.IntegerField(choices=Status.choices) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set default to INTIALIZING
|
|
||
| class EligibleEventBase(models.Model): | ||
| event_id = models.CharField(max_length=100, unique=True) | ||
| created_at = models.DateTimeField(default=timezone.now) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| created_at = models.DateTimeField(default=timezone.now) | |
| created_at = models.DateTimeField(auto_now_add=True) |
| event_id = models.CharField(max_length=100, unique=True) | ||
| created_at = models.DateTimeField(default=timezone.now) | ||
| updated_at = models.DateTimeField(auto_now=True) | ||
| resp_data = models.JSONField(null=True, blank=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set default to dict
| - command: 'ingest_icrc' | ||
| schedule: '0 3 * * 0' | ||
| # Schedule time yet to be decided | ||
| - command: 'poll_gdacs_cy' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - command: 'poll_gdacs_cy' | |
| - command: 'poll_gdacs_cyclone' |
f89066e to
f171c69
Compare
Changes
Checklist
Things that should succeed before merging.
Release
If there is a version update, make sure to tag the repository with the latest version.