makerspace / memberbooth

Displaying member info on a public machine
2 stars 0 forks source link

Send message to Slack#general when manual intervention is needed #96

Open emanuelen5 opened 3 years ago

emanuelen5 commented 3 years ago

I.e. currently needed for someone to change the label roll

emanuelen5 commented 3 years ago

Also "Editor line" error can be logged this way. Example stack trace that otherwise does not log anything:

2021-10-14 **:**:** INFO [/home/memberbooth/memberbooth/src/label/creator.py:302]: Creating a QR code for temporary storage with data: {"member_number":****v":1,"type":"temp","expiry_date":"2022-01-XX","unix_timestamp":1635000000,"description":"Description"}
2021-10-14 **:**:** ERROR [/home/memberbooth/memberbooth/src/gui/design.py:305]: GUI error: Printer not found, ensure that printer is connected and turned on. Also ensure that the "Editor Line" function is disabled.
BerglundDaniel commented 3 years ago

The easiest way to do this is probably by using the http listner function in slack machine and put it in the slack bot.

emanuelen5 commented 3 years ago

We have Slack logging already using the Python package "slack". We basically we just need to change what channel it logs to. https://github.com/makerspace/memberbooth/blob/master/src/util/slack_client.py