-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SDESK-7443] - Planning: Migrate planning:delete_spiked command to as…
…ync (#2134) * Implement base async `planning.events` resource and service SDESK-7441 * Fix linter issues SDESK-7441 * Implement base async `planning` resource and service SDESK-7441 * Update command to use new format * Basic async models and services for `published` & `assignments` SDESK-7441 * Copied get_expired_items to new Events async service * Copied get_expired_items to new Planning async service * Updated tests * Added utils file * Fix pytests and ~80% of behave tests Fix behave tests partially SDESK-7441 Allow behave tests to run async code SDESK-7441 Fix pytests and use python 3.10 only Disable some actions and add verbose mode 999 Remove python 3.8 Point sd core to fix branch Revert "Fix linter issues" This reverts commit 152cfb5. Revert changes to ci-install SDESK-7441 Fix first batch of tests Reapply "Fix linter issues" This reverts commit e5ac69a. Fix second batch of tests SDESK-7441 Fix tests batch 3 Fix tests batch 4 SDESK-7441 Fix superdesk-core dependency Fix linter issues SDESK-7441 * Update requirements to async branch SDESK-7441 * Adjusted fields and indexes in assignments SDESK-7441 * Fix for types according to PR review SDESK-7441 * Suggested fixes * Refactored celery call to run command * Removed double import * Add events module to test config * Code refactor * Update types based on review feedback SDESK-7441 * Proper names and type SDESK-7441 * Make some fields optional SDESK-7441 * Fix index serializing issue SDESK-7441 * Remove not needed import SDESK-7441 * Fix typo SDESK-7441 * Fix failing tests * Fix failing tests * Fix failing tests * fix: Types warning on default factory: * improve: Use TestCase async setup from superdesk-core * fix: couple bugs in event/planning services * fix: couple bugs in delete_spiked_commands * fix lint and type issues --------- Co-authored-by: Helmy Giacoman <[email protected]> Co-authored-by: Mark Pittaway <[email protected]>
- Loading branch information
1 parent
a4f7d42
commit 421a61b
Showing
11 changed files
with
567 additions
and
320 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,17 @@ | ||
from .flag_expired_items import FlagExpiredItems # noqa | ||
from .delete_spiked_items import DeleteSpikedItems # noqa | ||
from .delete_spiked_items import delete_spiked_items_handler # noqa | ||
from .delete_marked_assignments import DeleteMarkedAssignments # noqa | ||
from .export_to_newsroom import ExportToNewsroom # noqa | ||
from .export_scheduled_filters import ExportScheduledFilters # noqa | ||
from .purge_expired_locks import PurgeExpiredLocks # noqa | ||
from .replace_deprecated_event_item_attribute import ReplaceDeprecatedEventItemAttributeCommand # noqa | ||
from .async_cli import planning_cli, commands_blueprint # noqa | ||
|
||
|
||
def configure_cli(app) -> None: | ||
""" | ||
Sets the current app instance into the `AsyncAppGroup` to later be passed as context of the commands. | ||
It also registers the commands blueprint | ||
""" | ||
|
||
app.register_blueprint(commands_blueprint) |
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,3 @@ | ||
from superdesk.core.cli import create_commands_blueprint | ||
|
||
commands_blueprint, planning_cli = create_commands_blueprint("planning") |
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.