Skip to content

Staging #186

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

Merged
merged 3 commits into from
Jul 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/sync-signals-with-metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class Signal(Base):
race_breakdown = sqlalchemy.Column(sqlalchemy.Integer)
reporting_cadence = sqlalchemy.Column(sqlalchemy.String)
restrictions = sqlalchemy.Column(sqlalchemy.Text)
severenity_pyramid_rungs = sqlalchemy.Column(sqlalchemy.String)
severity_pyramid_rungs = sqlalchemy.Column(sqlalchemy.String)
temporal_scope_end = sqlalchemy.Column(sqlalchemy.String)
temporal_scope_end_note = sqlalchemy.Column(sqlalchemy.Text)
temporal_scope_start = sqlalchemy.Column(sqlalchemy.String)
Expand Down Expand Up @@ -148,9 +148,15 @@ def set_data(self) -> None:
)
)
session.commit()
logger.info(f"Signal {signal_data['signal']} successfully updated.")
logger.info(
f"Signal {signal_data['signal']} successfully updated."
)
except AttributeError:
logger.error(f"Failed to update signal {signal_data['signal']}. Probably the issue is with the source or source with name {signal_data['source']} does not exist.")
logger.error(
f"""Failed to update signal {signal_data['signal']}.
Probably the issue is with the source or source with name
{signal_data['source']} does not exist."""
)


def main():
Expand Down
Loading