-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…own_Phishing_URL taking a long time to load.
- Loading branch information
1 parent
16e4e6a
commit 4ccdad9
Showing
5 changed files
with
219 additions
and
17 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
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
50 changes: 50 additions & 0 deletions
50
migrations/versions/fc0cab9d77dc_fetch_revision_count_limit.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,50 @@ | ||
"""Fetch Revision Count Limit | ||
Revision ID: fc0cab9d77dc | ||
Revises: a688cf44cd8a | ||
Create Date: 2023-02-19 22:45:12.789465 | ||
""" | ||
import datetime | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import mysql | ||
|
||
# revision identifiers, used by Alembic. | ||
from app.models import cfg_settings | ||
|
||
revision = 'fc0cab9d77dc' | ||
down_revision = 'a688cf44cd8a' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
date_created = datetime.datetime.now().isoformat() | ||
date_modified = datetime.datetime.now().isoformat() | ||
|
||
op.bulk_insert( | ||
cfg_settings.Cfg_settings.__table__, | ||
[ | ||
{ | ||
"key": "FETCH_REVISION_COUNT_LIMIT", | ||
"value": "25", | ||
"public": True, | ||
"date_created": date_created, | ||
"date_modified": date_modified, | ||
"description": "The number of revisions to limit on fetch of Yara Rules." | ||
} | ||
] | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
keys = ["FETCH_REVISION_COUNT_LIMIT"] | ||
for key in keys: | ||
op.execute("""DELETE from cfg_settings where `key`='%s';""" % (key)) | ||
|
||
# ### end Alembic commands ### |