Renamed src package to sebimachine.
- Gave the package a descriptive name.
- Passed over with black once more.
- Created setup.py to install dependencies.
- Updated author to reflect repo ownership to Dusty.
- Changed `git` command to use the __url__ attribute.
- Changed music to use ogg vorbis instead of mp3, purely for
performance.
- Tried to make sure nothing broke.
- Updated dockerfile. Pretty sure we don't need it though...
This commit is contained in:
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python3.6
|
||||
# -*- coding: utf-8 -*-
|
||||
import asyncio
|
||||
import functools
|
||||
|
||||
|
||||
def no_block(func):
|
||||
"""Turns a blocking function into a non-blocking coroutine function."""
|
||||
|
||||
@functools.wraps(func)
|
||||
async def no_blocking_handler(*args, **kwargs):
|
||||
partial = functools.partial(func, *args, **kwargs)
|
||||
return await asyncio.get_event_loop().run_in_executor(None, partial)
|
||||
|
||||
return no_blocking_handler
|
||||
Reference in New Issue
Block a user