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

[SDESK-7386] Add Resource Data & Web signals #2817

Merged
merged 11 commits into from
Jan 19, 2025
4 changes: 2 additions & 2 deletions apps/comments/comments.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def on_fetched(self, doc):
decode_keys(item, "mentioned_users")
decode_keys(item, "mentioned_desks")

def on_created(self, docs):
async def on_created(self, docs):
for doc in docs:
if self.notifications:
push_notification(self.notification_key, item=str(doc.get("item")))
Expand All @@ -102,7 +102,7 @@ def on_created(self, docs):

if self.notifications:
# TODO-ASYNC: Support async (see superdesk.tests.markers.requires_eve_resource_async_event)
notify_mentioned_users(docs, get_app_config("CLIENT_URL", "").rstrip("/"))
await notify_mentioned_users(docs, get_app_config("CLIENT_URL", "").rstrip("/"))
notify_mentioned_desks(docs)

def on_updated(self, updates, original):
Expand Down
2 changes: 1 addition & 1 deletion docs/core/elastic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The :attr:`get_client_async <resources.ElasticResources.get_client>` method retu

Elastic References
------------------
.. autoclass:: superdesk.core.elastic.common.ElasticResourceConfig
.. autoclass:: superdesk.core.types.ElasticResourceConfig
:member-order: bysource
:members:

Expand Down
6 changes: 3 additions & 3 deletions docs/core/mongo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ The :attr:`get_db_async <MongoResources.get_db_async>` method returns an instanc

Mongo References
----------------
.. autoclass:: superdesk.core.mongo.MongoResourceConfig
.. autoclass:: superdesk.core.types.MongoResourceConfig
:member-order: bysource
:members:

.. autoclass:: superdesk.core.mongo.MongoIndexOptions
.. autoclass:: superdesk.core.types.MongoIndexOptions
:member-order: bysource
:members:

.. autoclass:: superdesk.core.mongo.MongoIndexCollation
.. autoclass:: superdesk.core.types.MongoIndexCollation
:member-order: bysource
:members:

Expand Down
8 changes: 4 additions & 4 deletions docs/core/resources.rst
Original file line number Diff line number Diff line change
Expand Up @@ -542,8 +542,8 @@ The :meth:`Resources.register <model.Resources.register>` method provides a way
using the :class:`ResourceConfig <model.ResourceConfig>` class to provide the resource config.

This will register the resource with MongoDB and optionally the Elasticsearch system. See
:class:`MongoResourceConfig <superdesk.core.mongo.MongoResourceConfig>` and
:class:`ElasticResourceConfig <superdesk.core.elastic.common.ElasticResourceConfig>` for MongoDB and Elastic config options.
:class:`MongoResourceConfig <superdesk.core.types.MongoResourceConfig>` and
:class:`ElasticResourceConfig <superdesk.core.types.ElasticResourceConfig>` for MongoDB and Elastic config options.

Example module::

Expand Down Expand Up @@ -599,7 +599,7 @@ You can also use the ``resources`` config from a Module to automatically registe
API References
--------------

.. autoclass:: superdesk.core.resources.model.Resources
.. autoclass:: superdesk.core.resources.resource_manager.Resources
:member-order: bysource
:members:

Expand All @@ -614,7 +614,7 @@ Resource Model
:member-order: bysource
:members: id

.. autoclass:: superdesk.core.resources.model.ResourceConfig
.. autoclass:: superdesk.core.resources.resource_config.ResourceConfig
:member-order: bysource
:members:

Expand Down
Loading
Loading