I hereby claim:
- I am ask on github.
- I am asksol (https://keybase.io/asksol) on keybase.
- I have a public key ASDn1BRTWvEf99dvp86-UNeZveCEufqJLdULQyCX36ulZAo
To claim this, I am signing this object:
| from enum import Enum | |
| import faust | |
| from faust import cli | |
| from faust import web | |
| class State(Enum): | |
| # State of a shipment. | |
| ISSUED = 'ISSUED' | |
| CREATED = 'CREATED' | 
| # finally: behavior changed from Python 3.6 to Python 3.7 | |
| async def foo(): | |
| try: | |
| async for item in Bar(): | |
| raise Exception('foo') | |
| except Exception: | |
| pass | |
| import asyncio | |
| from typing import Any, Awaitable, Callable, Optional, Type | |
| # eh, like the @cached_property idiom, but async and you do `await x.y` | |
| class async_cached_property: | |
| name: str | |
| def __init__(self, getter: Callable[[], Awaitable]) -> None: | 
I hereby claim:
To claim this, I am signing this object:
| #project.async | |
| from celery import Celery | |
| celery = Celery(autofinalize=False) | |
| def configure_celery(flask_app): | |
| #...set celery up | |
| celery.config_from_object(app.config) | |
| #!/usr/bin/env python | |
| import logging | |
| from pika import BlockingConnection, ConnectionParameters | |
| if __name__ == '__main__': | |
| logging.basicConfig(level=logging.INFO) | 
| from celery import abstract | |
| from celery import current_app | |
| from kombu import Exchange, Queue | |
| from kombu.mixins import ConsumerMixin | |
| # need to subclass the result backend so that it uses a topic exchange | |
| # instead of direct, and send the results for tasks using a routing_key | |
| # of the format: | 
| -When I'm configuring in a Django app, what is the purpose of the djcelery models? Right --now tables get created, but nothing flows into them. Is this the database backend | |
| ---- replacement for Redis and RabbitMQ? Or is it something else? | |
| - Several database tables are used: | |
| * Monitoring | |
| When you use the django-admin monitor the cluster state is written | |
| to the TaskState and WorkerState tables. | 
| import eventlet | |
| from eventlet import wsgi | |
| from eventlet import sleep | |
| def switch(it): | |
| for item in it: | |
| yield item | |
| sleep(0.0) | 
| from collections import deque | |
| from celery.result import BaseAsyncResult, TaskSetResult | |
| from celery.task import chord, task, TaskSet | |
| def force_list(l): | |
| if not isinstance(l, (list, tuple)): | |
| return [l] | |
| return l |