Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM python:3.7-slim
RUN apt-get update && apt-get install -y python3-dev libssl-dev libffi-dev musl-dev make gcc g++ libzmq5 libzmq3-dev curl libtool autoconf automake
WORKDIR /tmp
COPY anthill /tmp/anthill
COPY setup.py /tmp
COPY pip.conf ~/
RUN pip install .
RUN rm -rf /tmp
7 changes: 5 additions & 2 deletions anthill/common/aqmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1092,8 +1092,11 @@ async def consume(self):
self._consumer_tag = consumer_tag
log.debug('Consumer tag is %s', self._consumer_tag)

def cancel(self):
return self._channel.basic_cancel(consumer_tag=self._consumer_tag_given)
async def cancel(self):
if self._consumer_tag is None:
return
await self._channel.basic_cancel(consumer_tag=self._consumer_tag)
self._consumer_tag = None


class TimeoutError(Exception):
Expand Down
2 changes: 1 addition & 1 deletion anthill/common/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def listen_server(self):

def listen_port(ports):
for port in ports:
self.http_server.listen(int(port), "127.0.0.1")
self.http_server.listen(int(port), "0.0.0.0")

def listen_unix(sockets):
for sock in sockets:
Expand Down
3 changes: 3 additions & 0 deletions pip.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[global]
extra-index-url = https://cdn.anthillplatform.org/python
https://pypi.org/simple
9 changes: 3 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,12 @@
"Sphinx==1.8.1",
"pyOpenSSL==18.0.0",
"cffi==1.11.5",
"cryptography==2.3.1",
"cryptography==3.2",
"expiringdict==1.1.4",
"python-geoip-python3==1.3",
# get the latest available
"python-geoip-geolite2-yplan",
"psutil==5.6.6",
"lazy==1.3",
"pympler==0.6",
"sprockets-influxdb==2.2.0",
"sprockets-influxdb==2.2.1",
"aioredis==1.1.0",
"pika==0.12.0",
"anthill-PyMySQL==0.9.999",
Expand All @@ -31,7 +28,7 @@

setup(
name='anthill-common',
version='0.2.4',
version='0.2.5',
package_data={
"anthill.common": ["anthill/common/sql", "anthill/common/static"]
},
Expand Down