add sentry, rename file

This commit is contained in:
Jeffrey Paul 2019-08-08 04:49:03 -07:00
parent c188616917
commit 4fd6a60402
4 changed files with 30 additions and 4 deletions

View File

@ -7,6 +7,7 @@ verify_ssl = true
[packages] [packages]
sanelogging = "*" sanelogging = "*"
sentry-sdk = "==0.10.2"
[requires] [requires]
python_version = "3.6" python_version = "3.6"

24
Pipfile.lock generated
View File

@ -1,7 +1,7 @@
{ {
"_meta": { "_meta": {
"hash": { "hash": {
"sha256": "d189f59cdb9acb7b516c87ead0bf88b4ebc5d7057caf2f46d4cb25e25b317035" "sha256": "b2b160ff8a634b8c3542e2f350c55373f3090b7fccba55a8f8fcbec87ad9c3aa"
}, },
"pipfile-spec": 6, "pipfile-spec": 6,
"requires": { "requires": {
@ -16,6 +16,13 @@
] ]
}, },
"default": { "default": {
"certifi": {
"hashes": [
"sha256:046832c04d4e752f37383b628bc601a7ea7211496b4638f6514d0e5b9acc4939",
"sha256:945e3ba63a0b9f577b1395204e13c3a231f9bc0223888be653286534e5873695"
],
"version": "==2019.6.16"
},
"colorlog": { "colorlog": {
"hashes": [ "hashes": [
"sha256:3cf31b25cbc8f86ec01fef582ef3b840950dea414084ed19ab922c8b493f9b42", "sha256:3cf31b25cbc8f86ec01fef582ef3b840950dea414084ed19ab922c8b493f9b42",
@ -29,6 +36,21 @@
], ],
"index": "pypi", "index": "pypi",
"version": "==1.0.1" "version": "==1.0.1"
},
"sentry-sdk": {
"hashes": [
"sha256:d491aa6399eaa3eded433972751a9770180730fd8b4c225b0b7f49c4fa2af70b",
"sha256:d68003cdffbbfcadaa2c445b72e1050b0a44406f94199866f192986c016b23f5"
],
"index": "pypi",
"version": "==0.10.2"
},
"urllib3": {
"hashes": [
"sha256:b246607a25ac80bedac05c6f282e3cdaf3afb65420fd024ac94435cabe6e18d1",
"sha256:dbe59173209418ae49d485b87d1681aefa36252ee85884c31346debd19463232"
],
"version": "==1.25.3"
} }
}, },
"develop": {} "develop": {}

View File

@ -2,4 +2,4 @@
#234567891123456789212345678931234567894123456789512345678961234567897123456789 #234567891123456789212345678931234567894123456789512345678961234567897123456789
# encoding: utf-8 # encoding: utf-8
from .rpc import STRpcRunnerService from .server import STRpcRunnerService

View File

@ -2,21 +2,24 @@
#234567891123456789212345678931234567894123456789512345678961234567897123456789 #234567891123456789212345678931234567894123456789512345678961234567897123456789
# encoding: utf-8 # encoding: utf-8
from .job import STRpcJob
from .utils import *
from datetime import datetime, tzinfo, timedelta from datetime import datetime, tzinfo, timedelta
from sanelogging import log from sanelogging import log
from time import sleep from time import sleep
import json import json
import os import os
import pathlib import pathlib
import sentry_sdk
import socket import socket
import subprocess import subprocess
import uuid import uuid
from .job import STRpcJob
from .utils import *
class STRpcRunnerService(object): class STRpcRunnerService(object):
def __init__(self): def __init__(self):
sentry_sdk.init("https://598ba2b22ae947328590765e31e29a82@sentry.io/1525291")
self.dir = os.environ.get('STRPC_BASE','/var/run/strpc') self.dir = os.environ.get('STRPC_BASE','/var/run/strpc')
self.hostname = socket.gethostname() self.hostname = socket.gethostname()
self.hostdir = self.dir + '/' + self.hostname self.hostdir = self.dir + '/' + self.hostname