Skip to content

adding slack and pushbullet#9

Open
bjay1404 wants to merge 1 commit intoChronial:masterfrom
bjay1404:master
Open

adding slack and pushbullet#9
bjay1404 wants to merge 1 commit intoChronial:masterfrom
bjay1404:master

Conversation

@bjay1404
Copy link
Copy Markdown

I added slack and pushbullet

@bjay1404
Copy link
Copy Markdown
Author

Thoughts on the code?

@Chronial
Copy link
Copy Markdown
Owner

Hey, sry for not responding sooner – I didn't yet find time to go over the whole PR.

At a quick glance there seem to be some issues with it:

  • How does this handle the fact that existing config files don't have a pushbullet and slack config?
  • The comments in the config file don't seem correct
  • What does the title config in the slack section do?
  • Why did you rename the default config file name?
  • Won't this crash for everybody who doesn't have the slackclient python package installed?

apikey =

[slack]
; set to true to enable Pushbullet notification support
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy-paste error 😉

Comment thread snapraid-runner.py
from collections import Counter, defaultdict
from cStringIO import StringIO

from slackclient import SlackClient
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need really to add this dependency for everyone - could instead make it optional and import it within send_slack? (cf.send_email)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I don't use the slack client with my other code at this point. I use requests to make slack calls

Comment thread snapraid-runner.py

if config["logging"]["file"]:
max_log_size = min(config["logging"]["maxsize"], 0) * 1024
max_log_size = max(config["logging"]["maxsize"], 0) * 1024
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks accidental?

Comment thread snapraid-runner.py
parser = argparse.ArgumentParser()
parser.add_argument("-c", "--conf",
default="snapraid-runner.conf",
default="snapraid-runner ",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks accidental?

Comment thread snapraid-runner.py
from collections import Counter, defaultdict
from cStringIO import StringIO

from slackclient import SlackClient
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I don't use the slack client with my other code at this point. I use requests to make slack calls

@Chronial Chronial added notfication-service out-of-scope This feature is of scope for the (narrow) goals of snapraid-runner labels Oct 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

notfication-service out-of-scope This feature is of scope for the (narrow) goals of snapraid-runner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants