profile
viewpoint
Julien Phalip jphalip Google Inc. San Francisco, CA http://julienphalip.com

GoogleCloudPlatform/dlp-dataflow-deidentification 45

Multi Cloud Data Tokenization Solution By Using Dataflow and Cloud DLP

glamkit/glamkit-adminboost 11

Makes the Django admin even more awesomer

GoogleCloudPlatform/dataflow-video-analytics 11

Video Clip Analytics By Using Dataflow and Video AI For Object Tracking

glamkit/glamkit-blogtools 10

Mini framework for making Django blog apps

glamkit/glamkit-holdingpage 9

Holding page app for your Django site

glamkit/glamkit-commenttools 8

Useful bits to spice up comments in your Django site

glamkit/glamkit-feincmstools 7

Some neat and useful bits on top of FeinCMS

PR opened django/daphne

Only force a default endpoint w/o valid endpoint

If you run daphne --endpoint ssl:8000:privateKey=key.pem:certKey=cert.pem --bind 0.0.0.0 MyApp.asgi:application in trying to specify that the application should bind to 0.0.0.0, two bindings will be made to the same port, and daphne will never properly start. While I know the --bind 0.0.0.0 specification is unnecessary, it's certainly confusing to debug and is not intuitive from the standpoint of the programmer trying to use the CLI.

+11 -3

0 comment

1 changed file

pr created time in 7 hours

pull request commentdjango/asgiref

Add typing for ASGI Scopes, messages, and frameworks

Done! Thanks for your work on this, I'm excited to get the actual methods/functions typed now as well.

pgjones

comment created time in 9 hours

push eventdjango/asgiref

Phil Jones

commit sha cf99cb74f90f179373d09930ca89cdb23098d5a4

Added typing for ASGI Scopes, messages, and frameworks These are useful for users of asgiref to type check their ASGI usage. It also serves as the reference typing for the ASGI Specification. This does not include typing for the actual ASGI functions (yet).

view details

push time in 9 hours

PR merged django/asgiref

Add typing for ASGI Scopes, messages, and frameworks

These are useful for users of asgiref to type check their ASGI usage. It also serves as the reference typing for the ASGI Specification.

+209 -0

13 comments

2 changed files

pgjones

pr closed time in 9 hours

issue commentdjango/asgiref

Can a dedicated ThreadPoolExecutor be used in SyncToAsync?

The whole point of thread_sensitive is to enable the ORM to work - threadsafe does not mean that it is not thread sensitive (that is, connections vary per thread). The feature was built almost exactly for the reason you describe - making the ORM threading and persistent connections make sense.

The only thing left to do is to make it so that thread_sensitive mode has one thread per request rather than one thread per process, but there's a series of PRs dropping that are going to enable that.

HMaker

comment created time in 13 hours

issue commentdjango/asgiref

Can a dedicated ThreadPoolExecutor be used in SyncToAsync?

sync_to_async will always run the target function in the same thread as any other invocation of sync_to_async now that thread_sensitive defaults to True; would that not solve your issue? (Plus the executor only has a single thread anyway).

the thread_sensitive in my case is set to False since the ORM is thread-safe.

HMaker

comment created time in 15 hours

pull request commentdjango/asgiref

Add typing for ASGI Scopes, messages, and frameworks

I'd prefer to merge as is.

pgjones

comment created time in 15 hours

pull request commentdjango/asgiref

Add typing for ASGI Scopes, messages, and frameworks

I'm happy with this as is; let me know if you want to merge it or if you want to refine the typing a little with the omitted keys handled somehow. I personally think it's OK to not worry about handling omissions and be complete, or we could bring in something else that handles them OK (I know Pydantic does this, but it's not quite standard typing)

pgjones

comment created time in 15 hours

issue commentdjango/asgiref

Can a dedicated ThreadPoolExecutor be used in SyncToAsync?

sync_to_async will always run the target function in the same thread as any other invocation of sync_to_async now that thread_sensitive defaults to True; would that not solve your issue? (Plus the executor only has a single thread anyway).

HMaker

comment created time in 16 hours

PR closed django/asgiref

[WIP/RFC] SyncToAsync: use executor attribute

This allows for overriding it easily in derived classes, and it seems to be better than changing the loop's default executor (in the case of ASGI_THREADS being set).

Ref: https://github.com/django/channels/issues/1091

+48 -19

6 comments

2 changed files

blueyed

pr closed time in 16 hours

pull request commentdjango/asgiref

[WIP/RFC] SyncToAsync: use executor attribute

The PR is still marked as WIP so I'm going to close it to now as it's been over a year with no response from the author.

blueyed

comment created time in 16 hours

pull request commentdjango/asgiref

Internalize thread sensitive context management in asgiref/sync.py

I'll try to take a look at this next weekend; don't have much time right now

a-feld

comment created time in 16 hours

pull request commentdjango/asgiref

[WIP/RFC] SyncToAsync: use executor attribute

Is this PR going?

blueyed

comment created time in 16 hours

push eventGoogleCloudPlatform/df-ml-anomaly-detection

Masud

commit sha 021aec2a048db528234330062414ff40824f2e64

upgrade gradle

view details

Masud

commit sha 444c16b7122b4931904020f9fe2f88d5fb0cf3ed

local test done

view details

Masud

commit sha 321f40520925a69d02f4c7355ec4a47a0bb48766

local test done

view details

Masud

commit sha 845ea1a84ed0cd459302be45a45d1d2e0ed8706e

oe shcema merge for state and sensor

view details

push time in 17 hours

create barnchGoogleCloudPlatform/df-ml-anomaly-detection

branch : smart-city

created branch time in 17 hours

issue commentdjango/asgiref

StatelessServer.application_exception not using exc_info

[StatelessServer.application_exception][1] is not doing that, the format is not being applied, it's being deferred to the root logger's formatter:

async def application_exception(self, exception, application_details):
      """
      Called whenever an application coroutine has an exception.
      """
      logging.error(
          "Exception inside application: %s\n%s%s",
          exception,
          "".join(traceback.format_tb(exception.__traceback__)),
          "  {}".format(exception),
      )

I wonder why they are using the root logger instead of the module level logger. Anyway you can monkey patch this function or override it in some subclass.

hcastilho

comment created time in 19 hours

issue openeddjango/asgiref

Can a dedicated ThreadPoolExecutor be used in SyncToAsync?

I think it's common to use the @sync_to_async decorator to run Django ORM's queries, but in the current setup that function will be ran in the global thread pool. I would like to set a dedicated thread pool just to run database queries, so I can keep the database connections persistent for some time. Django states the following about persistent connections:

Since each thread maintains its own connection, your database must support at least as many simultaneous connections as you have worker threads [...] The development server creates a new thread for each request it handles, negating the effect of persistent connections. Don’t enable them during development.

In the global thread pool the threads may be busy running non query functions, so its persisted connection will not be usable. I think that could be done the same way it's done for single_thread_executor as a class variable of SyncToAsync, so user's could subclasss it and change the executor. Maybe allowing it to be passed throught constructor would be better.

created time in 19 hours

issue closeddjango/asgiref

Let the user setup the asyncio's event-loop the StatelessServer runs on

I needed to run Twisted code inside an ASGI application served by a StatelessServer, but it's not possible to setup the event-loop the server runs on, since it's created in StalelessServer.run(). Twisted supports integration with asyncio through the asyncio reactor, which is installed over a given asyncio loop, so the server should be ran over the same event-loop used to install the Twisted's reactor.

closed time in 19 hours

HMaker

issue commentdjango/channels_redis

aioredis.errors.ReplyError: ERR unknown command 'BZPOPMIN'

Never mind, fixed it by installing Memurai

HuangChangHuai

comment created time in a day

issue commentdjango/channels_redis

aioredis.errors.ReplyError: ERR unknown command 'BZPOPMIN'

How did you resolve this issue? I am also getting this error and I am using ubuntu 20.04 in WSL Redis version is 5.0.7

HuangChangHuai

comment created time in a day

issue openeddjango/channels

Why am I in AsyncWebsocketConsumer.connect Function to run the loop, the receive function will not receive any messages

Issues are for concrete, actionable bugs and feature requests only - if you're just asking for debugging help or technical support we have to direct you elsewhere. If you just have questions or support requests please use:

  • Stack Overflow
  • The Django Users mailing list django-users@googlegroups.com (https://groups.google.com/forum/#!forum/django-users)

We have to limit this because of limited volunteer time to respond to issues!

Please also try and include, if you can:

  • Your OS and runtime environment, and browser if applicable linux,python3.8

  • A pip freeze output showing your package versions aioredis==1.3.1 appdirs==1.4.4 asgiref==3.3.1 async-timeout==3.0.1 channels==3.0.3 channels-redis==3.2.0 cryptography==3.3.1 daphne==3.0.1 decorator==4.4.2 Django==3.0.5 django-daterange-filter==1.3.0 djongo==1.3.3 Jinja2==2.11.2 redis==3.5.3 rq==1.7.0 websockets==8.1

  • What you expected to happen vs. what actually happened is there a way to complete my needs?

  • How you're running Channels (runserver? daphne/runworker? Nginx/Apache in front?) python manage.py runserver

  • Console logs and full tracebacks of any errors no errors. The websocket client can receive messages from server's loop.

created time in a day

issue openedGoogleCloudPlatform/community

Issue with tutorials/run-laravel-on-appengine-standard/index.md

When I run the project locally with php artisan server it works perfectly, but when I upload it to gcloud I get the error: ERR_TOO_MANY_REDIRECTS. I tried to use private browsing and delete the cookies.

created time in a day

pull request commentGoogleCloudPlatform/community

New Tutorial: Getting Started with Anthos on Bare Metal

live: https://cloud.google.com/community/tutorials/antho-bare-metal-getting-started

mikegcoleman

comment created time in a day

pull request commentdjango/asgiref

sync_to_async for converting generators to async generators

As a note for other async newcomers like myself, by far the easiest way to deal with this is just to move the entire block using querysets to a separate, non-async function and then wrap that function call in a sync_to_async where you previously had the block. I wasted a huge amount of time thinking that I should be able to get it done in the async function, and it is almost certain to not be time worth spent for others either!

While that becomes clearer after you waste time then re-read https://docs.djangoproject.com/en/3.1/topics/async/, it might be nice to add a note to that page. Would that be a reasonable addition? Should I submit a PR?

devxpy

comment created time in a day

pull request commentGoogleCloudPlatform/community

New Tutorial: Getting Started with Anthos on Bare Metal

I'll submit this for publication this afternoon. The build and submission process takes a couple of hours, so it's possible that this might not go live until the beginning of the next business day.

mikegcoleman

comment created time in a day

push eventGoogleCloudPlatform/community

Mike Coleman

commit sha ce92d1259e049467bdc4666908fd7a25413f4809

New Tutorial: Getting Started with Anthos on Bare Metal (#1560) * initial commit * fixed formatting * fixed formatting * fixed formatting * fixed formatting * fixed formatting * fixed formatting * fixed formatting * fixed formatting * fixed formatting * fixed formatting * fixed formatting * fixed frontmatter Removed extraneous space to make linter happy. Removed unnecessary tags (those that are already covered by title and such). * updated publication date * first line edit during read-through detailed copy edit coming next * copy edit Co-authored-by: Todd Kopriva <43478937+ToddKopriva@users.noreply.github.com>

view details

push time in a day

PR merged GoogleCloudPlatform/community

New Tutorial: Getting Started with Anthos on Bare Metal cla: yes

It was suggested that I move this post from the Google Cloud Practitioners blog to the community site since it is a straight up tutorial.

+437 -0

2 comments

1 changed file

mikegcoleman

pr closed time in a day

issue commentGoogleCloudPlatform/community

Tutorial Request: configuring domain name and static IP address for nginx controller

its pretty straightforward, but it would be nice to clear and concise documentation on this

abbasogaji

comment created time in 2 days

issue openedGoogleCloudPlatform/community

Issue with tutorials/dlp-hybrid-inspect/index.md

https://cloud.google.com/community/tutorials/dlp-hybrid-inspect

"hybrid inspection method" link is broken.

created time in 2 days

more