Skip to content

Conversation

@sandeshit
Copy link

Changes

  • Base app for alert system.
  • Poll different sources.

Checklist

Things that should succeed before merging.

  • Updated/ran unit tests
  • Updated CHANGELOG.md

Release

If there is a version update, make sure to tag the repository with the latest version.

@sandeshit sandeshit marked this pull request as draft November 12, 2025 05:41
@sandeshit sandeshit requested a review from susilnem November 12, 2025 06:33

class Connector(models.Model):
class ConnectorType(models.TextChoices):
GDACS_FLOOD = "GDACS_FLOOD", "GDACS_FLOOD"
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

class Status(models.IntegerChoices):


class Status(models.IntegerChoices):
SUCCESS = 1
FAILURE = 2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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)
Copy link
Member

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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)
Copy link
Member

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'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- command: 'poll_gdacs_cy'
- command: 'poll_gdacs_cyclone'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants