Signals in Superdesk

We use Flask signals to allow custom development on Superdesk.

Usage:

from superdesk import item_update


def my_item_update_handler(sender, item, **kwargs):
    print('item updated', item)


def init_app(app):

    item_update.connect(my_item_update_handler)

Core Signals

item_update

Sent before new version is saved.

Parameters:
  • sender – ArchiveService

  • updates – changes to be saved

  • original – original item version

item_updated

Sent after new version is saved.

New in version 1.33.

Parameters:
  • sender – ArchiveService

  • item – updated item

  • original – original item version

item_publish

Sent before item is published.

New in version 1.30.

Parameters:
  • sender – PublishService

  • item – item to publish

item_published

Sent when item is published.

Parameters:
  • sender – PublishService

  • item – published item

item_fetched

Sent after item is fetched.

New in version 1.29.

Parameters:
  • sender – FetchService

  • item – fetched item in production

  • ingest_item – item in ingest

item_move

Sent before item is moved to different desk/stage.

New in version 1.33.

Parameters:
  • sender – MoveService

  • item – item after moving

  • original – item before moving

item_moved

Sent after item is moved to different desk/stage.

New in version 1.29.

Parameters:
  • sender – MoveService

  • item – item after moving

  • original – item before moving

item_rewrite

Sent before item update is created

New in version 1.29.

Parameters:
  • sender – ArchiveRewriteService

  • item – new item update

  • original – original item

item_validate

Validate item

You can add errors to response and that will prevent publishing and display those errors to users.

New in version 1.30.1.

Parameters:
  • sender – ValidateService

  • item – item to validate

  • response – human readable list or errors

  • error_fields – system readable errors info

item_duplicate

Sent before item is duplicated

New in version 2.0.

Parameters:
  • sender – ArchiveService

  • item – duplicated item to be saved

  • original – original item

  • operation – operation

item_duplicated

Sent after item is duplicated

New in version 2.0.

Parameters:
  • sender – ArchiveService

  • item – duplicated item

  • original – original item

  • operation – operation

archived_item_removed

Sent then item is removed from archived

..versionadded:: 1.34

Parameters:
  • sender – archived service

  • item – item being removed from archived