TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #9 · 7 јан.

Иногда бывает ситуация когда dev-сервер по какой-либо причине не закрылся и висит в процессах, занимая порт. Это может быть из-за падения IDE или просто сам забыл погасить и закрыл терминал. Для таких случаев я набросал простую функцию с командой: kill_on_port() { port=$(lsof -t -i:$1) echo "KILL PROCESS:" $port sudo kill -9 $port } alias killonport="kill_on_port $@" Код поместить в ~/.bashrc и рестартнуть систему. Если во время старта dev-сервера получаете ошибку что порт уже занят, просто выполните команду, подставив свой порт. Bash kill_on_port 8000 Скорее всего бесполезно, если другой процесс назначен на перезапуск вашего dev-сервера в случае падения. Имя команды можете изменить на любое другое. #linux

Hashtags

Резултати

Пронајдени 3 слични објави

Пребарај: #aiopg

当前筛选 #aiopg清除筛选
djangoproject

@djangoproject · Post #167 · 22.09.2016 г., 14:01

https://github.com/aio-libs/aiomysql #aiomysql is a "driver" for accessing a #MySQL database from the #asyncio (PEP-3156/tulip) framework. It depends on and reuses most parts of #PyMySQL . aiomysql tries to be like awesome #aiopg library and preserve same api, look and feel. Internally aiomysql is copy of PyMySQL, underlying io calls switched to async, basically yield from and asyncio.coroutine added in proper places)). sqlalchemy support ported from aiopg.

djangoproject

@djangoproject · Post #293 · 10.04.2017 г., 09:41

http://aiomysql.readthedocs.io/en/latest/sa.html aiomysql.sa — support for SQLAlchemy functional SQL layer sqlalchemy support ported from #aiopg, so #api should be very familiar for aiopg user. While core API provides a core support for access to #MySQL#database, manipulations with raw SQL strings too annoying. Fortunately we can use excellent SQLAlchemy Core as SQL query builder. So you can execute SQL #query built by tbl.insert().values(val='abc') or tbl.select() expressions. #sqlalchemy has rich and very powerful set of SQL construction functions, please read tutorial for full list of available operations. Also we provide SQL transactions support. Please take a look on SAConnection.begin() method and family.