Skip to content

Commit

Permalink
Address PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
shayancanonical committed Oct 23, 2023
1 parent 672badd commit 86e8516
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/kubernetes_logrotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class LogRotate(logrotate.LogRotate):

def __init__(self, *, container_: container.Container):
super().__init__(container_=container_)
self._logrotate_config = self._container.path("/etc/logrotate.d/flush_mysqlrouter_logs")
self._logrotate_executor = self._container.path("/logrotate_executor.py")

def enable(self) -> None:
Expand Down
4 changes: 3 additions & 1 deletion src/logrotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
"""

import abc
import logging
import pathlib

import jinja2
import logging

import container

Expand All @@ -25,6 +25,8 @@ class LogRotate(abc.ABC):
def __init__(self, *, container_: container.Container):
self._container = container_

self._logrotate_config = self._container.path("/etc/logrotate.d/flush_mysqlrouter_logs")

def enable(self) -> None:
"""Enable logrotate."""
logger.debug("Creating logrotate config file")
Expand Down
2 changes: 0 additions & 2 deletions src/rock.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ def update_mysql_router_service(self, *, enabled: bool, tls: bool = None) -> Non
startup = ops.pebble.ServiceStartup.DISABLED.value
layer = ops.pebble.Layer(
{
"summary": "MySQL Router layer",
"services": {
self._SERVICE_NAME: {
"override": "replace",
Expand Down Expand Up @@ -124,7 +123,6 @@ def update_logrotate_executor_service(self, *, enabled: bool) -> None:
)
layer = ops.pebble.Layer(
{
"summary": "Logrotate executor layer",
"services": {
self._LOGROTATE_EXECUTOR_SERVICE_NAME: {
"override": "replace",
Expand Down

0 comments on commit 86e8516

Please sign in to comment.