from channels.layers import get_channel_layer
from multiprocessing import Process
from asgiref.sync import AsyncToSync, SyncToAsync
class GenericAgent(Process):
def __init__(self, *args, **kwargs):self.channel_layer = get_channel_layer()self.send_message = AsyncToSync(self.channel_layer.group_send)super().__init__(*args, **kwargs)def run(self):while True:print("Sending data")self.send_message('test', {'test': 0})time.sleep(1)
aioredis==1.2.0asgiref==2.3.2async-timeout==3.0.1attrs==18.2.0autobahn==18.11.1Automat==0.7.0certifi==2018.4.16channels==2.1.5channels-redis==2.3.1chardet==3.0.4constantly==15.1.0daphne==2.2.3Django==2.0.6easy-thumbnails==2.5future==0.15.2hiredis==0.2.0hyperlink==18.0.0idna==2.7imageio==2.3.0incremental==17.5.0interop==0.0.0LatLon23==1.0.7monotonic==1.2msgpack==0.5.6numpy==1.14.4Pillow==5.1.0psycopg2-binary==2.7.5PyHamcrest==1.9.0pyproj==1.9.5.1pytz==2018.4rawpy==0.10.1requests==2.19.1six==1.11.0sorl-thumbnail==12.4.1Twisted==18.9.0txaio==18.8.1urllib3==1.23zope.interface==4.6.0
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4916f184-9db9-4d34-a9cd-3d6ff5238aff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
1542149506.032331 [0 172.19.0.4:45506] "BRPOPLPUSH" "asgi:specific.eYdlWGyC!" "asgi:specific.eYdlWGyC!$inflight" "5"
1542149512.043776 [0 172.19.0.4:45506] "EVAL" "\n local backed_up = redis.call('LRANGE', ARGV[2], 0, -1)\n for i = #backed_up, 1, -1 do\n redis.call('LPUSH', ARGV[1], backed_up[i])\n end\n redis.call('DEL', ARGV[2])\n " "0" "asgi:specific.eYdlWGyC!" "asgi:specific.eYdlWGyC!$inflight"
1542149512.043867 [0 lua] "LRANGE" "asgi:specific.eYdlWGyC!$inflight" "0" "-1"
1542149512.043884 [0 lua] "DEL" "asgi:specific.eYdlWGyC!$inflight"
1542149512.044194 [0 172.19.0.4:45506] "BRPOPLPUSH" "asgi:specific.eYdlWGyC!" "asgi:specific.eYdlWGyC!$inflight" "5"
1542149518.056667 [0 172.19.0.4:45506] "EVAL" "\n local backed_up = redis.call('LRANGE', ARGV[2], 0, -1)\n for i = #backed_up, 1, -1 do\n redis.call('LPUSH', ARGV[1], backed_up[i])\n end\n redis.call('DEL', ARGV[2])\n " "0" "asgi:specific.eYdlWGyC!" "asgi:specific.eYdlWGyC!$inflight"
1542149518.056757 [0 lua] "LRANGE" "asgi:specific.eYdlWGyC!$inflight" "0" "-1"
1542149518.056773 [0 lua] "DEL" "asgi:specific.eYdlWGyC!$inflight"
1542149518.057120 [0 172.19.0.4:45506] "BRPOPLPUSH" "asgi:specific.eYdlWGyC!" "asgi:specific.eYdlWGyC!$inflight" "5"
1542149524.068806 [0 172.19.0.4:45506] "EVAL" "\n local backed_up = redis.call('LRANGE', ARGV[2], 0, -1)\n for i = #backed_up, 1, -1 do\n redis.call('LPUSH', ARGV[1], backed_up[i])\n end\n redis.call('DEL', ARGV[2])\n " "0" "asgi:specific.eYdlWGyC!" "asgi:specific.eYdlWGyC!$inflight"
1542149524.068919 [0 lua] "LRANGE" "asgi:specific.eYdlWGyC!$inflight" "0" "-1"
1542149524.068935 [0 lua] "DEL" "asgi:specific.eYdlWGyC!$inflight"
1542149524.069345 [0 172.19.0.4:45506] "BRPOPLPUSH" "asgi:specific.eYdlWGyC!" "asgi:specific.eYdlWGyC!$inflight" "5"
1542149530.080909 [0 172.19.0.4:45506] "EVAL" "\n local backed_up = redis.call('LRANGE', ARGV[2], 0, -1)\n for i = #backed_up, 1, -1 do\n redis.call('LPUSH', ARGV[1], backed_up[i])\n end\n redis.call('DEL', ARGV[2])\n " "0" "asgi:specific.eYdlWGyC!" "asgi:specific.eYdlWGyC!$inflight"
1542149530.080999 [0 lua] "LRANGE" "asgi:specific.eYdlWGyC!$inflight" "0" "-1"
1542149530.081015 [0 lua] "DEL" "asgi:specific.eYdlWGyC!$inflight"
1542149530.081372 [0 172.19.0.4:45506] "BRPOPLPUSH" "asgi:specific.eYdlWGyC!" "asgi:specific.eYdlWGyC!$inflight" "5"
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/Y2xNv_aOVqE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFwN1upK-iXuxbZNTcPu78OzPnDAfS8-E%3DfOHnPUio0u1dppRw%40mail.gmail.com.
1542152017.290859 [0 lua] "EXPIRE" "asgi:specific.cNbsZzOu!" "60"
1542152017.290866 [0 lua] "LLEN" "asgi:specific.aqRkFBbT!"
1542152017.290874 [0 lua] "LPUSH" "asgi:specific.aqRkFBbT!" "\x83\xa4type\xa4test\xa4test\xa4test\xb0__asgi_channel__\x91\xbespecific.aqRkFBbT!FCpiHVGLaITQ