fixed backend deployment with systemd

pull/30/head
b3yond 2018-07-14 17:17:36 +02:00
parent 2d879383d4
commit 10b3550ad6
4 changed files with 8 additions and 3 deletions

View File

@ -133,6 +133,11 @@ sudo service nginx restart
sudo cp deployment/ticketfrei-web.service /etc/systemd/system/ sudo cp deployment/ticketfrei-web.service /etc/systemd/system/
sudo systemctl daemon-reload sudo systemctl daemon-reload
sudo systemctl start ticketfrei-web.service sudo systemctl start ticketfrei-web.service
# create and start the backend systemd service
sudo cp deployment/ticketfrei-backend.service /etc/systemd/system
sudo systemctl daemon-reload
sudo systemctl start ticketfrei-backend.service
``` ```
### Logs ### Logs

View File

@ -21,7 +21,7 @@ class MastodonBot(Bot):
try: try:
m = Mastodon(*user.get_masto_credentials()) m = Mastodon(*user.get_masto_credentials())
except TypeError: except TypeError:
logger.error("No Mastodon Credentials in database.", exc_info=True) #logger.error("No Mastodon Credentials in database.", exc_info=True)
return mentions return mentions
try: try:
notifications = m.notifications() notifications = m.notifications()

View File

@ -30,7 +30,7 @@ class TwitterBot(Bot):
try: try:
api = self.get_api(user) api = self.get_api(user)
except Exception: except Exception:
logger.error("Error Authenticating Twitter", exc_info=True) #logger.error("Error Authenticating Twitter", exc_info=True)
return reports return reports
last_mention = user.get_seen_tweet() last_mention = user.get_seen_tweet()
try: try:

View File

@ -9,7 +9,7 @@ ExecStart=/srv/ticketfrei/bin/python3 backend.py
#RuntimeDirectory=uwsgi #RuntimeDirectory=uwsgi
Restart=always Restart=always
KillSignal=SIGQUIT KillSignal=SIGQUIT
Type=notify Type=simple
StandardError=syslog StandardError=syslog
NotifyAccess=all NotifyAccess=all