l3uddz / cloudplow

Automatic rclone remote uploader, with support for multiple remote/folder pairings. UnionFS Cleaner functionality: Deletion of UnionFS whiteout files and their corresponding files on rclone remotes. Automatic remote syncer: Sync between different remotes via a Scaleway server instance, that is created and destroyed at every sync.
GNU General Public License v3.0
338 stars 48 forks source link

Throttle notifications failing to discord notifier #101

Closed m1lkman closed 2 years ago

m1lkman commented 3 years ago

Describe the bug When using discord notifications and throttling is enabled, throttle notifications fail. Other notifications are successful to discord, i.e. cloudplow start/stop. Tried both formats for url value 'https://' and 'discord://'.

To Reproduce Steps to reproduce the behavior:

  1. Configure both throttling and discord notification
  2. Launch cloudplow
  3. Errors are logged in cloudplow log and throttle notifications are not sent

Logs

2021-01-29 16:05:39,687 - ERROR      - apprise              - send                           - Error sending notification to 'https://discord.com/api/webhooks/xxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxx
Traceback (most recent call last):
  File "/opt/cloudplow/utils/notifications/apprise.py", line 26, in send
    body=kwargs['message'],
  File "/usr/local/lib/python3.6/dist-packages/apprise/Apprise.py", line 434, in notify
    if not py3compat.asyncio.notify(coroutines, debug=self.debug):
  File "/usr/local/lib/python3.6/dist-packages/apprise/py3compat/asyncio.py", line 77, in notify
    loop = asyncio.get_event_loop()
  File "/usr/lib/python3.6/asyncio/events.py", line 694, in get_event_loop
    return get_event_loop_policy().get_event_loop()
  File "/usr/lib/python3.6/asyncio/events.py", line 602, in get_event_loop
    % threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'plex-monitor'.

System Information

8a8al00ey commented 2 years ago

Try latest version

saltydk commented 2 years ago

should be fixed

m1lkman commented 2 years ago

works, thanks all