Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
omar-selo committed Jul 7, 2023
1 parent 17b6136 commit c19976b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 2 additions & 9 deletions backend/charm/src/charm.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import logging

from charms.data_platform_libs.v0.data_interfaces import (
DatabaseCreatedEvent,
DatabaseEndpointsChangedEvent,
DatabaseRequires,
RelationChangedEvent,
RelationJoinedEvent,
Expand Down Expand Up @@ -87,13 +85,8 @@ def _migrate_database(self):

self.unit.status = ActiveStatus()

def _on_database_changed(
self,
event: DatabaseCreatedEvent | DatabaseEndpointsChangedEvent,
):
logger.info("Database changed event: %s", event)
if isinstance(event, DatabaseCreatedEvent):
self._migrate_database()
def _on_database_changed(self, event):
self._migrate_database()
self._update_layer_and_restart(None)

def _on_database_relation_broken(self, event):
Expand Down
2 changes: 1 addition & 1 deletion terraform/test-observer.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ terraform {
provider "juju" {}

variable "environment" {
description = "The environment to deploy to (dev, stage, prod)"
description = "The environment to deploy to (development, staging, production)"
}

variable "external_ingress_hostname" {
Expand Down

0 comments on commit c19976b

Please sign in to comment.