-
-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
80 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#!/usr/bin/env python3 | ||
from xiaomusic.cli import main | ||
|
||
if __name__ == "__main__": | ||
from xiaomusic.cli import main | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
#!/usr/bin/env python3 | ||
import argparse | ||
import json | ||
import logging | ||
import os | ||
import signal | ||
|
||
import uvicorn | ||
|
||
from xiaomusic import __version__ | ||
from xiaomusic.config import Config | ||
from xiaomusic.httpserver import HttpInit | ||
from xiaomusic.httpserver import app as HttpApp | ||
from xiaomusic.xiaomusic import XiaoMusic | ||
import sentry_sdk | ||
from sentry_sdk.integrations.asyncio import AsyncioIntegration | ||
from sentry_sdk.integrations.logging import LoggingIntegration | ||
|
||
LOGO = r""" | ||
__ __ _ __ __ _ | ||
|
@@ -22,7 +19,30 @@ | |
""" | ||
|
||
|
||
sentry_sdk.init( | ||
dsn="https://[email protected]/sentry/4508470200434688", | ||
traces_sample_rate=0.1, | ||
profiles_sample_rate=0.05, | ||
integrations=[ | ||
AsyncioIntegration(), | ||
LoggingIntegration( | ||
level=logging.WARNING, | ||
event_level=logging.ERROR, | ||
), | ||
], | ||
# debug=True, | ||
) | ||
|
||
|
||
def main(): | ||
import uvicorn | ||
|
||
from xiaomusic import __version__ | ||
from xiaomusic.config import Config | ||
from xiaomusic.httpserver import HttpInit | ||
from xiaomusic.httpserver import app as HttpApp | ||
from xiaomusic.xiaomusic import XiaoMusic | ||
|
||
parser = argparse.ArgumentParser() | ||
parser.add_argument( | ||
"--port", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters