Skip to content
Snippets Groups Projects
Commit 0f9914af authored by Charlotte Hausman's avatar Charlotte Hausman
Browse files

Merge branch 'change-email-for-annihilator-failure' into '2.8.4-DEVELOPMENT'

Change email for annihilator failure

See merge request !1667
parents 7dd25188 12166da9
No related branches found
No related tags found
2 merge requests!1706merge 2.8.4 to main,!1667Change email for annihilator failure
Pipeline #15829 passed with warnings
Pipeline: workspaces

#15830

    ......@@ -90,7 +90,7 @@ def _get_settings(profile: str) -> Settings:
    workflow_url = config.settings("edu.nrao.workspaces.WorkflowSettings").serviceUrl
    notification_url = notification_settings.serviceUrl
    failure_notification_email = notification_settings.analystEmail
    failure_notification_email = notification_settings.vlaPipeOpsLeadsEmail
    cache_directory = config.settings("edu.nrao.workspaces.DeliverySettings").cacheWeblogDirectory
    spool_directory = config.settings("edu.nrao.workspaces.ProcessingSettings").rootDirectory
    staging_directory = ingestion_settings.stagingDirectory
    ......@@ -500,8 +500,9 @@ class CalibrationAnnihilator(WorkflowAnnihilator):
    params = {
    "wf_name": self._workflow,
    "time_to_keep": (datetime.datetime.now() - relativedelta(days=int(self.get_days_to_keep("calibration"))))
    .strftime('%Y-%m-%d %H:%M:%S'),
    "time_to_keep": (
    datetime.datetime.now() - relativedelta(days=int(self.get_days_to_keep("calibration")))
    ).strftime("%Y-%m-%d %H:%M:%S"),
    }
    return self.get_stale_directories_from_query(query, params)
    ......@@ -534,8 +535,9 @@ class ImageAnnihilator(WorkflowAnnihilator):
    params = {
    "wf_name": self._workflow,
    "time_to_keep": (datetime.datetime.now() - relativedelta(days=int(self.get_days_to_keep("image"))))
    .strftime('%Y-%m-%d %H:%M:%S'),
    "time_to_keep": (
    datetime.datetime.now() - relativedelta(days=int(self.get_days_to_keep("image")))
    ).strftime("%Y-%m-%d %H:%M:%S"),
    }
    stales = self.get_stale_directories_from_query(query, params)
    ......@@ -570,8 +572,9 @@ class ImageAnnihilator(WorkflowAnnihilator):
    params = {
    "wf_name": self._workflow,
    "cal_wf_name": TypedAnnihilators.CAL.value,
    "time_to_keep": (datetime.datetime.now() - relativedelta(days=int(self.get_days_to_keep("image"))))
    .strftime('%Y-%m-%d %H:%M:%S'),
    "time_to_keep": (
    datetime.datetime.now() - relativedelta(days=int(self.get_days_to_keep("image")))
    ).strftime("%Y-%m-%d %H:%M:%S"),
    }
    stales.extend(self.get_stale_directories_from_query(query, params))
    ......
    ......@@ -75,6 +75,7 @@ edu.nrao.workspaces.ProductFetcherSettings.executionSite = local_test
    # Notification Settings
    #
    edu.nrao.workspaces.NotificationSettings.analystEmail = workspaces-analysts-test@listmgr.nrao.edu
    edu.nrao.workspaces.NotificationSettings.vlaPipeOpsLeadsEmail = workspaces-analysts-test@listmgr.nrao.edu
    edu.nrao.workspaces.NotificationSettings.sendPIEmail = False
    #
    ......@@ -94,5 +95,5 @@ edu.nrao.workspaces.AnnihilatorSettings.keepSpoolForDays = 10
    edu.nrao.workspaces.AnnihilatorSettings.keepStagingForDays = 10
    edu.nrao.workspaces.AnnihilatorSettings.keepStorageForDays = 10
    edu.nrao.workspaces.AnnihilatorSettings.keepCacheForDays = 10
    edu.nrao.workspaces.AnnihilatorSettings.keepCalibrationSpoolForDays = 10
    edu.nrao.workspaces.AnnihilatorSettings.keepNonSrdpCalSpoolForDays = 10
    edu.nrao.workspaces.AnnihilatorSettings.keepImageSpoolForDays = 10
    # Copyright (C) 2023 Associated Universities, Inc. Washington DC, USA.
    #
    # This file is part of NRAO Workspaces.
    #
    # Workspaces is free software: you can redistribute it and/or modify
    # it under the terms of the GNU General Public License as published by
    # the Free Software Foundation, either version 3 of the License, or
    # (at your option) any later version.
    #
    # Workspaces is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    # GNU General Public License for more details.
    #
    # You should have received a copy of the GNU General Public License
    # along with Workspaces. If not, see <https://www.gnu.org/licenses/>.
    #
    """populate initial matrix
    Revision ID: 84c6626eb6cd
    Revises: d822cf6844bb
    Revises: 4cd2d7009346
    Create Date: 2024-05-16 15:19:40.127244
    """
    from alembic import op
    # revision identifiers, used by Alembic.
    revision = "84c6626eb6cd"
    down_revision = "d822cf6844bb"
    down_revision = "4cd2d7009346"
    branch_labels = None
    depends_on = None
    ......@@ -69,7 +85,7 @@ def upgrade():
    SELECT 'restore_cms' as capability_name,
    cv.matrix_id as matrix_id
    FROM casa_matrix_casa_versions cv
    WHERE cv.casa_version = '{version[0]}'
    WHERE cv.casa_version = '{version[0]}'
    """
    )
    # basic MS restores
    ......@@ -79,7 +95,7 @@ def upgrade():
    SELECT 'restore_basic_ms' as capability_name,
    cv.matrix_id as matrix_id
    FROM casa_matrix_casa_versions cv
    WHERE cv.casa_version = '{version[0]}'
    WHERE cv.casa_version = '{version[0]}'
    """
    )
    ......@@ -92,7 +108,7 @@ def upgrade():
    SELECT 'std_calibration' as capability_name,
    cv.matrix_id as matrix_id
    FROM casa_matrix_casa_versions cv
    WHERE cv.casa_version = '{version[0]}'
    WHERE cv.casa_version = '{version[0]}'
    """
    )
    # standard cms imaging
    ......@@ -102,7 +118,7 @@ def upgrade():
    SELECT 'std_cms_imaging' as capability_name,
    cv.matrix_id as matrix_id
    FROM casa_matrix_casa_versions cv
    WHERE cv.casa_version = '{version[0]}'
    WHERE cv.casa_version = '{version[0]}'
    """
    )
    # standard restore imaging
    ......@@ -112,7 +128,7 @@ def upgrade():
    SELECT 'std_restore_imaging' as capability_name,
    cv.matrix_id as matrix_id
    FROM casa_matrix_casa_versions cv
    WHERE cv.casa_version = '{version[0]}'
    WHERE cv.casa_version = '{version[0]}'
    """
    )
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment