-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #830 from MolSSI/rm_log
Remove server stats & compute manager logs
- Loading branch information
Showing
23 changed files
with
117 additions
and
687 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
qcfractal/qcfractal/alembic/versions/2024-05-06-73b4838a6839_remove_server_stats_log.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
"""Remove server stats log | ||
Revision ID: 73b4838a6839 | ||
Revises: 75b80763e901 | ||
Create Date: 2024-05-06 10:54:44.383709 | ||
""" | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "73b4838a6839" | ||
down_revision = "75b80763e901" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_index("ix_server_stats_log_timestamp", table_name="server_stats_log", postgresql_using="brin") | ||
op.drop_table("server_stats_log") | ||
|
||
op.execute("DELETE FROM internal_jobs WHERE name = 'update_server_stats'") | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table( | ||
"server_stats_log", | ||
sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False), | ||
sa.Column("timestamp", postgresql.TIMESTAMP(timezone=True), autoincrement=False, nullable=False), | ||
sa.Column("collection_count", sa.INTEGER(), autoincrement=False, nullable=True), | ||
sa.Column("molecule_count", sa.BIGINT(), autoincrement=False, nullable=True), | ||
sa.Column("record_count", sa.BIGINT(), autoincrement=False, nullable=True), | ||
sa.Column("outputstore_count", sa.BIGINT(), autoincrement=False, nullable=True), | ||
sa.Column("access_count", sa.BIGINT(), autoincrement=False, nullable=True), | ||
sa.Column("db_total_size", sa.BIGINT(), autoincrement=False, nullable=True), | ||
sa.Column("db_table_size", sa.BIGINT(), autoincrement=False, nullable=True), | ||
sa.Column("db_index_size", sa.BIGINT(), autoincrement=False, nullable=True), | ||
sa.Column("db_table_information", postgresql.JSON(astext_type=sa.Text()), autoincrement=False, nullable=True), | ||
sa.Column("error_count", sa.BIGINT(), autoincrement=False, nullable=True), | ||
sa.Column("service_queue_status", postgresql.JSON(astext_type=sa.Text()), autoincrement=False, nullable=True), | ||
sa.Column("task_queue_status", postgresql.JSON(astext_type=sa.Text()), autoincrement=False, nullable=True), | ||
sa.PrimaryKeyConstraint("id", name="server_stats_log_pkey"), | ||
) | ||
op.create_index( | ||
"ix_server_stats_log_timestamp", "server_stats_log", ["timestamp"], unique=False, postgresql_using="brin" | ||
) | ||
# ### end Alembic commands ### |
48 changes: 48 additions & 0 deletions
48
qcfractal/qcfractal/alembic/versions/2024-05-06-75b80763e901_remove_compute_manager_log.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
"""Remove compute manager log | ||
Revision ID: 75b80763e901 | ||
Revises: f31c7897345f | ||
Create Date: 2024-05-06 10:08:30.711531 | ||
""" | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "75b80763e901" | ||
down_revision = "f31c7897345f" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_index("ix_compute_manager_log_manager_id", table_name="compute_manager_log") | ||
op.drop_table("compute_manager_log") | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table( | ||
"compute_manager_log", | ||
sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False), | ||
sa.Column("manager_id", sa.INTEGER(), autoincrement=False, nullable=False), | ||
sa.Column("timestamp", postgresql.TIMESTAMP(timezone=True), autoincrement=False, nullable=False), | ||
sa.Column("successes", sa.INTEGER(), autoincrement=False, nullable=False), | ||
sa.Column("claimed", sa.INTEGER(), autoincrement=False, nullable=False), | ||
sa.Column("failures", sa.INTEGER(), autoincrement=False, nullable=False), | ||
sa.Column("total_cpu_hours", sa.DOUBLE_PRECISION(precision=53), autoincrement=False, nullable=False), | ||
sa.Column("active_tasks", sa.INTEGER(), autoincrement=False, nullable=False), | ||
sa.Column("active_cores", sa.INTEGER(), autoincrement=False, nullable=False), | ||
sa.Column("active_memory", sa.DOUBLE_PRECISION(precision=53), autoincrement=False, nullable=False), | ||
sa.Column("rejected", sa.INTEGER(), autoincrement=False, nullable=False), | ||
sa.ForeignKeyConstraint( | ||
["manager_id"], ["compute_manager.id"], name="compute_manager_log_manager_id_fkey", ondelete="CASCADE" | ||
), | ||
sa.PrimaryKeyConstraint("id", name="compute_manager_log_pkey"), | ||
) | ||
op.create_index("ix_compute_manager_log_manager_id", "compute_manager_log", ["manager_id"], unique=False) | ||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.