-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🎨Computational backend: DV-2 computational scheduler becomes replicab…
…le (🗃️🚨) (#6736)
- Loading branch information
Showing
45 changed files
with
3,224 additions
and
1,125 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
68 changes: 68 additions & 0 deletions
68
.../src/simcore_postgres_database/migration/versions/7ad64e963e0f_add_timezone_comp_tasks.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,68 @@ | ||
"""add_timezone_comp_tasks | ||
Revision ID: 7ad64e963e0f | ||
Revises: b7f23f6d8aa2 | ||
Create Date: 2024-11-27 22:28:51.898433+00:00 | ||
""" | ||
import sqlalchemy as sa | ||
from alembic import op | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "7ad64e963e0f" | ||
down_revision = "b7f23f6d8aa2" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column( | ||
"comp_tasks", | ||
"submit", | ||
existing_type=postgresql.TIMESTAMP(), | ||
type_=sa.DateTime(timezone=True), | ||
existing_nullable=True, | ||
) | ||
op.alter_column( | ||
"comp_tasks", | ||
"start", | ||
existing_type=postgresql.TIMESTAMP(), | ||
type_=sa.DateTime(timezone=True), | ||
existing_nullable=True, | ||
) | ||
op.alter_column( | ||
"comp_tasks", | ||
"end", | ||
existing_type=postgresql.TIMESTAMP(), | ||
type_=sa.DateTime(timezone=True), | ||
existing_nullable=True, | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column( | ||
"comp_tasks", | ||
"end", | ||
existing_type=sa.DateTime(timezone=True), | ||
type_=postgresql.TIMESTAMP(), | ||
existing_nullable=True, | ||
) | ||
op.alter_column( | ||
"comp_tasks", | ||
"start", | ||
existing_type=sa.DateTime(timezone=True), | ||
type_=postgresql.TIMESTAMP(), | ||
existing_nullable=True, | ||
) | ||
op.alter_column( | ||
"comp_tasks", | ||
"submit", | ||
existing_type=sa.DateTime(timezone=True), | ||
type_=postgresql.TIMESTAMP(), | ||
existing_nullable=True, | ||
) | ||
# ### end Alembic commands ### |
33 changes: 33 additions & 0 deletions
33
...ore_postgres_database/migration/versions/b7f23f6d8aa2_added_distributed_comp_scheduler.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,33 @@ | ||
"""added_distributed_comp_scheduler | ||
Revision ID: b7f23f6d8aa2 | ||
Revises: c9db8bf5091e | ||
Create Date: 2024-11-26 17:06:27.053774+00:00 | ||
""" | ||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "b7f23f6d8aa2" | ||
down_revision = "c9db8bf5091e" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column( | ||
"comp_runs", sa.Column("scheduled", sa.DateTime(timezone=True), nullable=True) | ||
) | ||
op.add_column( | ||
"comp_runs", sa.Column("processed", sa.DateTime(timezone=True), nullable=True) | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column("comp_runs", "processed") | ||
op.drop_column("comp_runs", "scheduled") | ||
# ### end Alembic commands ### |
87 changes: 87 additions & 0 deletions
87
...e/src/simcore_postgres_database/migration/versions/e05bdc5b3c7b_add_timezone_comp_runs.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,87 @@ | ||
"""add_timezone_comp_runs | ||
Revision ID: e05bdc5b3c7b | ||
Revises: 7ad64e963e0f | ||
Create Date: 2024-11-27 22:51:21.112336+00:00 | ||
""" | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "e05bdc5b3c7b" | ||
down_revision = "7ad64e963e0f" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column( | ||
"comp_runs", | ||
"created", | ||
existing_type=postgresql.TIMESTAMP(), | ||
type_=sa.DateTime(timezone=True), | ||
existing_nullable=False, | ||
existing_server_default="now()", | ||
) | ||
op.alter_column( | ||
"comp_runs", | ||
"modified", | ||
existing_type=postgresql.TIMESTAMP(), | ||
type_=sa.DateTime(timezone=True), | ||
existing_nullable=False, | ||
existing_server_default="now()", | ||
) | ||
op.alter_column( | ||
"comp_runs", | ||
"started", | ||
existing_type=postgresql.TIMESTAMP(), | ||
type_=sa.DateTime(timezone=True), | ||
existing_nullable=True, | ||
) | ||
op.alter_column( | ||
"comp_runs", | ||
"ended", | ||
existing_type=postgresql.TIMESTAMP(), | ||
type_=sa.DateTime(timezone=True), | ||
existing_nullable=True, | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column( | ||
"comp_runs", | ||
"ended", | ||
existing_type=sa.DateTime(timezone=True), | ||
type_=postgresql.TIMESTAMP(), | ||
existing_nullable=True, | ||
) | ||
op.alter_column( | ||
"comp_runs", | ||
"started", | ||
existing_type=sa.DateTime(timezone=True), | ||
type_=postgresql.TIMESTAMP(), | ||
existing_nullable=True, | ||
) | ||
op.alter_column( | ||
"comp_runs", | ||
"modified", | ||
existing_type=sa.DateTime(timezone=True), | ||
type_=postgresql.TIMESTAMP(), | ||
existing_nullable=False, | ||
existing_server_default="now()", | ||
) | ||
op.alter_column( | ||
"comp_runs", | ||
"created", | ||
existing_type=sa.DateTime(timezone=True), | ||
type_=postgresql.TIMESTAMP(), | ||
existing_nullable=False, | ||
existing_server_default="now()", | ||
) | ||
# ### 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
Oops, something went wrong.