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

Background: Make send_notification async and let it throw errors #85

Merged
merged 5 commits into from
Jun 21, 2023

Conversation

leolost2605
Copy link
Member

  • Makes send_notification async and instead of catching errors itself it throws them
  • This fixes an issue with notify_background.callback () being called before yield if something fails in send_notification

I already based this on #84 but this issue also exists in main

commit 46848f6
Author: Gustavo Marques <[email protected]>
Date:   Mon Jun 5 16:04:27 2023 -0300

    Background: make asynchronous, get notifications proxy lazily

    make all of the dbus calls and methods asynchronous so that we don't end up
    blocking others interfaces, methods and initialization.

    the notification proxy is now also started when we first call
    send_notification() so we don't end starting it early than necessary or
    blocking the initialization for too much time.

    Signed-off-by: Gustavo Marques <[email protected]>

commit d1d2a43
Author: Gustavo Marques <[email protected]>
Date:   Mon Jun 5 15:46:55 2023 -0300

    Background: minor changes

    * move dbus interfaces out of the classes bodies, use constants for path and
      name.

    * use enumeration values where applicable and skip the namespace when possible.

    * simplify the response callback in the notify_background().

    * make the notification_closed() callback return ALLOW_ONCE in more types of
      reasons.

    * remove temporary variables where applicable.

    Signed-off-by: Gustavo Marques <[email protected]>
@danirabbit
Copy link
Member

@leolost2605 can you resolve conflicts here please?

@leolost2605 leolost2605 requested a review from a team June 12, 2023 19:54
@danirabbit danirabbit merged commit 196d97f into main Jun 21, 2023
@danirabbit danirabbit deleted the async-send-notification branch June 21, 2023 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants