Skip to content
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

feat(scheduler): update scheduler for flexibility #513

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: christopherpickering/no-azure-action@v1.1.0

- name: ⎔ Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18

Expand All @@ -45,7 +45,7 @@ jobs:
useLockFile: false

- name: 🐍 Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v4

- name: ⎔ Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18

Expand All @@ -24,7 +24,7 @@ jobs:
useLockFile: false

- name: 🐍 Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: christopherpickering/no-azure-action@v1.1.0

- name: ⎔ Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18

Expand All @@ -33,7 +33,7 @@ jobs:
useLockFile: false

- name: 🐍 Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
uses: christopherpickering/no-azure-action@v1.1.0

- name: ⎔ Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18

Expand All @@ -55,7 +55,7 @@ jobs:
useLockFile: false

- name: 🐍 Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exclude: >

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: pretty-format-json
args: [--autofix]
Expand All @@ -30,18 +30,18 @@ repos:
- id: check-yaml
- id: end-of-file-fixer
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
exclude: migrations* | docs*
additional_dependencies: [toml]
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 24.2.0
hooks:
- id: black
language_version: python3.9
language_version: python3.11
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.10.0
rev: v2.12.0
hooks:
- id: pretty-format-toml
args: [--autofix]
Expand All @@ -50,6 +50,6 @@ repos:
- id: pretty-format-yaml
args: [--autofix, --indent, '2']
- repo: https://github.com/Riverside-Healthcare/djLint
rev: v1.33.0
rev: v1.34.1
hooks:
- id: djlint-jinja
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ class TestConfig(DevConfig):
# pylint: disable=too-few-public-methods
SQLALCHEMY_DATABASE_URI = os.environ.get(
"DATABASE_URL",
"postgresql+psycopg2://postgres@localhost/atlas_hub_scrap_test"
"postgresql+psycopg2://postgres@localhost/atlas_hub_scrap_test",
# "sqlite:///../test.sqlite",
).replace("postgres://", "postgresql://")

Expand Down
99 changes: 99 additions & 0 deletions migrations/versions/41eb15d37c84_.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
"""empty message

Revision ID: 41eb15d37c84
Revises: e075a9d31b1a
Create Date: 2024-02-13 20:17:23.622449

"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = '41eb15d37c84'
down_revision = 'e075a9d31b1a'
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('connection_database', schema=None) as batch_op:
batch_op.create_index(batch_op.f('ix_connection_database_connection_id'), ['connection_id'], unique=False)

with op.batch_alter_table('project', schema=None) as batch_op:
batch_op.alter_column('cron_year',
existing_type=sa.INTEGER(),
type_=sa.String(length=120),
existing_nullable=True)
batch_op.alter_column('cron_month',
existing_type=sa.INTEGER(),
type_=sa.String(length=120),
existing_nullable=True)
batch_op.alter_column('cron_week',
existing_type=sa.INTEGER(),
type_=sa.String(length=120),
existing_nullable=True)
batch_op.alter_column('cron_day',
existing_type=sa.INTEGER(),
type_=sa.String(length=120),
existing_nullable=True)
batch_op.alter_column('cron_week_day',
existing_type=sa.INTEGER(),
type_=sa.String(length=120),
existing_nullable=True)
batch_op.alter_column('cron_hour',
existing_type=sa.INTEGER(),
type_=sa.String(length=120),
existing_nullable=True)
batch_op.alter_column('cron_min',
existing_type=sa.INTEGER(),
type_=sa.String(length=120),
existing_nullable=True)
batch_op.alter_column('cron_sec',
existing_type=sa.INTEGER(),
type_=sa.String(length=120),
existing_nullable=True)

# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('project', schema=None) as batch_op:
batch_op.alter_column('cron_sec',
existing_type=sa.String(length=120),
type_=sa.INTEGER(),
existing_nullable=True)
batch_op.alter_column('cron_min',
existing_type=sa.String(length=120),
type_=sa.INTEGER(),
existing_nullable=True)
batch_op.alter_column('cron_hour',
existing_type=sa.String(length=120),
type_=sa.INTEGER(),
existing_nullable=True)
batch_op.alter_column('cron_week_day',
existing_type=sa.String(length=120),
type_=sa.INTEGER(),
existing_nullable=True)
batch_op.alter_column('cron_day',
existing_type=sa.String(length=120),
type_=sa.INTEGER(),
existing_nullable=True)
batch_op.alter_column('cron_week',
existing_type=sa.String(length=120),
type_=sa.INTEGER(),
existing_nullable=True)
batch_op.alter_column('cron_month',
existing_type=sa.String(length=120),
type_=sa.INTEGER(),
existing_nullable=True)
batch_op.alter_column('cron_year',
existing_type=sa.String(length=120),
type_=sa.INTEGER(),
existing_nullable=True)

with op.batch_alter_table('connection_database', schema=None) as batch_op:
batch_op.drop_index(batch_op.f('ix_connection_database_connection_id'))

# ### end Alembic commands ###