celery5.2.1以下版本任务调用多耗费1秒
问题
5.0.5版本celery存在一个缺陷, 调用任务耗时多用1秒
这个问题在5.2.0, 5.1.2同样存在
没理解为什么到5.2.1版本才解决,甚至一度把celery排除python技术栈
环境描述
python3.6 celery5.0.5 windows 32位
调用celery任务代码摘要
# 1.send_task返回AsyncResult # 2.AsyncResult的get()等待返回结果 # 3.get()会比真实多耗费1秒,并且每次请求都会出现 from celery import Celery class xxxCelery(Celery): def call_xxx(self, name, timeout=120, **kwargs): LOG.info("send_task: %s" % locals()) start = time.time() r = self.send_task(name, **kwargs) g = eventlet.spawn(r.get, timeout=timeout) result = g.wait() print("cost: %s" % time.time()-start) return
两个版本比对
分析celery源码之后,可以知道问题在drain_events()内部, 比较5.2.0和5.2.1版本
#celery/backends/asynchronuse.py class greenletDrainer(Drainer): ... def run(self): self._started.set() while not self._stopped.is_set(): try: self.result_consumer.drain_events(timeout=1) # 新增了两句, 估摸着是这个问题 self._send_drain_complete_event() self._create_drain_complete_event() except socket.timeout: pass self._shutdown.set()
解决办法
celery升级到5.2.1
python要升级到3.7以上版本(celery要求python3.7以上版本)
解决效果
耗时从1000多ms变成了30ms
2023年6月26日 23:07
Vitel Global India has come up with such inventive thought before the outbreak of the pandemic itself and started providing VoIP business phone services to many industries without being compromised in the installation or the customer support.
2023年6月28日 15:52
A very awesome blog post. We are really grateful for your blog post. You will find a lot of approaches after visiting your post.
2023年7月10日 21:42
The blog section on this site is my favorite. The articles are well-written and cover a wide range of interesting topics.<a href="https://dlc.co.ke/"title="Business coaching kenya "> Business coaching kenya</a>
2023年7月13日 20:34
A very awesome blog post. We are really grateful for your blog post. You will find a lot of approaches after visiting your post.
2023年7月17日 18:25
Hi, My name is Priya Rao and I am working as Marketing Manager with Dr. C.V. Raman University, Bilaspur. Phone (India) : 07753-253801, 91111-08039, 91111-08040
2023年7月17日 19:55
Whisskers marketing Pvt. Ltd. Is the finest digital marketing company that has an enriching experience of working with all kinds of industries and companies�?? sizes. Whisskers believes in providing high quality and following a strict timeline to deliver the project. At Whisskers each client is treated as unique to provide customised digital marketing services and budget friendly plans.
2023年7月19日 20:21
I have been surprised to read over and again that cooking in cast iron is known to greatly increase our dietary source of iron by leaching small amounts of iron into the food we eat. People who are anemic, or have other iron deficiencies, may benefit from this effect, though those with excess iron issues (i.e., people with hemochromatosis) may suffer negative effects.
2023年7月23日 06:05
Hi everyone, I really love your story. You have very useful information; I am from Imamia Quran Academy. Online ahle tashi Madrasa has enabled students to grasp and learn Quran knowledge via one click. It includes the basic beliefs of the Shias, the history of Islam, Nahj al-Balagha (which contains the sermons of Hazrat Ali a.s), and the prayers of other imams such as the book of supplications of Hazrat Imam Sajjad a.s, (Sahifa Sajjadiya).
2023年7月26日 13:42
I am curious to find out what blog system you’re working with? I’m experiencing some minor security problems with my latest blog and I’d like to find something more safe. Do you have any suggestions? warung168
2023年8月07日 19:42
<a href="https://www.centurysteelkuwait.com/"> CenturySteel</a>
2023年8月10日 22:54
i love to also get some beach body but it requires a lot of diet modification and exercise, Ice Cream Cakes in Sanjose
2023年8月15日 20:33
lucky me i see ghost hoodie As the weather gets cooler, finding a stylish and cozy hoodie is a must. And this one takes it a step further with its ghostly charm. It's the perfect balance between spooky and chic – a true wardrobe essential for the upcoming season.
2023年8月18日 21:44 Thanks for a very interesting blog. What else may I get that kind of info written in such a perfect approach? I’ve a undertaking that I am simply now operating on, and I have been at the look out for such info. NEVADA FAKE ID
2023年8月18日 21:50
This particular papers fabulous, and My spouse and i enjoy each of the perform that you have placed into this. I’m sure that you will be making a really useful place. I has been additionally pleased. Good perform! sunwin07
2023年8月24日 03:33
Yes i am totally agreed with this article and i just want say that this article is very nice and very informative article.I will make sure to be reading your blog more. You made a good point but I can't help but wonder, what about the other side? !!!!!!Thanks bunimanten.com
2023年8月25日 03:45
You make so many great points here that I read your article a couple of times. Your views are in accordance with my own for the most part. This is great content for your readers. 123 movies
2023年8月27日 15:00
This is my first time i visit here. I found so many entertaining stuff in your blog, especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the leisure here! Keep up the good work. I have been meaning to write something like this on my website and you have given me an idea. seo gak guna
2023年8月27日 15:14 It’s very informative and you are obviously very knowledgeable in this area. You have opened my eyes to varying views on this topic with interesting and solid content. DMT for sale
2023年8月29日 13:16
I recently found many useful information in your website especially this blog page. Among the lots of comments on your articles. Thanks for sharing. boost.web.id
2023年8月29日 14:32
First You got a great blog .I will be interested in more similar topics. i see you got really very useful topics, i will be always checking your blog thanks. Avaliador Premiado
2023年8月29日 22:36 Thank you for the post. I will definitely comeback. GSA SER List
2023年8月31日 17:00
Thanks for sharing this quality information with us. I really enjoyed reading. Will surely going to share this URL with my friends. last minute naar playa paraiso
2023年9月02日 19:19
Likewise Cannabis is an Oklahoma medical and recreational cannabis dispensary with locations in OKC cannabis dispensary, Edmond cannabis dispensary and Stillwater recreational cannabis dispensary locations. We specialize in offering the best deals on rosin, resin, concentrates, cartridges, edibles, flower, tinctures, topicals, pills and more. If you're looking for the best recreational cannabis dispensary near me with the best prices and deals, drop by today!
2023年9月06日 05:30
Snel, veilig en betrouwbaar research chemicals kopen kunt u
hier doen bij Researchchempro! Het Veilige Alternatief
om Onderzoekschemicaliën te Kopen U Gaat Research Chemicals Kopen.
https://warychems.com/product/methylfenidaat-poeder/
https://warychems.com/product/mephedrone/
https://warychems.com/product/alprazolam-1mg/
https://warychems.com/product/alprazolam-poeder/
https://warychems.com/product/2-fdck/
https://warychems.com/product/ketamine-poeder/
https://warychems.com/product/modafinil-poeder/
Research Chemicals kopen Nederland is marktleider op het gebied van RC’s.
Bij ons vind je de beste kwaliteit,
Discreet verpakte Research Chemicals van Nederland! CATHINONEN,
LIQUIDS, PELLETS, BLOTTERS, DCK, 2F-DCK,
METHALLYLESCALINE, 4FMA, 6APB, 4FMPH, 1P-LSD, 2FMA
https://warychems.com/product/1b-lsd-blotters/
https://warychems.com/product/1p-lsd-pellets/
https://warychems.com/product/2-fa/
https://warychems.com/product/2c-b-pellets-2/
https://warychems.com/product/3-mmc-kristal/
https://warychems.com/product/a-pvp/
https://warychems.com/product/bromazolam-poeder/
https://warychems.com/product/diclazepam-poeder/
https://warychems.com/product/eth-lad-poeder/
https://warychems.com/product/ethylone/
https://warychems.com/product/etizolam-3mg/
https://warychems.com/product/ghb-poeder/
https://warychems.com/product/jwh-018/
https://warychems.com/product/mdma-kristal/
https://warychems.com/product/mdma-pillen-100mg/
https://warychems.com/product/mephedrone/
https://warychems.com/product/methylone/
https://warychems.com/product/synthacaine/
buy chems online
buy research chems
research chemicals kopen
research chemicals credit cards
research chemicals online
buy research chemicals online netherlands
Research Chemicals kopen
2023年9月06日 05:31
Kaufen Sie Marihuana Online mit Cannabis Online Dispensary.
Kaufen Sie Weed Online mit Tracking,
Eßwaren, Konzentrate, Sativa's, Indica's & Hybriden.
Dispensary Versand weltweit
https://caliweedpacks.com/
Cannabis online kaufen
Cannabis-Online-Shop
Weed Lieferung
Marihuana online einkaufen
Marihuana Shop online
Marihuana online
thc shop online
2023年9月09日 14:35
Yuk, teman-teman, buruan kunjungi situs slot gacor WLA ini! Saya baru saja meraih kemenangan besar di sini dan saya tak sabar untuk berbagi keseruan ini dengan Anda semua. Tidak perlu khawatir tentang keamanan, karena situs ini sangat terpercaya. Temukan peluang menang menarik dan rasakan sensasi jackpot yang tak terlupakan! Segera coba keberuntungan Anda, dan siapa tahu, Anda bisa menjadi pemenang berikutnya! SLot Gacor
2023年9月13日 15:11
If you are looking for more information about flat rate locksmith Las Vegas check that right away. boxingstreamsr8
2023年9月14日 05:56
https://stonersmeds.com/nl/shop/buy-3-fmc-powder-research-chemical-online/
https://stonersmeds.com/nl/shop/buy-moroccan-caramello-hash/
https://stonersmeds.com/nl/winkel/koop-lsd-100mcg-blotters-online/
https://stonersmeds.com/nl/shop/4-cmc-kristalpoeder-online-goedkoop-kopen/
https://stonersmeds.com/pl/
https://stonersmeds.com/nl/winkel/koop-crack-cocaine-online/
https://stonersmeds.com/nl/shop/koop-crack-cocaine-online/
https://stonersmeds.com/nl/winkel/koop-k2-papier-online/
https://stonersmeds.com/nl/winkel/buy-moroccan-caramello-hash/
https://stonersmeds.com/nl/shop/koop-honing-marokkaans-blond-hash/
https://stonersmeds.com/nl/shop/buy-peruvian-cocaine-92-pure/
https://stonersmeds.com/de/shop/kaufen-echte-qualitat-tesla-ecstasy-pillen-online/
https://stonersmeds.com/nl/winkel/koop-echte-kwaliteit-tesla-ecstasy-pillen-online/
https://stonersmeds.com/nl/shop/buy-nepalese-stick-hash/
https://stonersmeds.com/de/shop/u-47700-pulver-1-oz-groshandel-online-kaufen/
https://stonersmeds.com/nl/product-categorie/breken/
https://stonersmeds.com/nl/shop/koop-hi-tech-hoest-siroop-online/
https://stonersmeds.com/de/shop/buy-4mmc-mephedrone-online/
https://stonersmeds.com/pl/shop/kup-actavis-prometazyna-syrop-na-kaszel-16-uncji/
https://stonersmeds.com/shop/3-fma/
https://stonersmeds.com/pl/kategoria-produktu/psychodeliki/
https://stonersmeds.com/nl/shop/koop-alpha-pvp-online/
https://stonersmeds.com/fr/shop/
https://stonersmeds.com/pl/sklep/kup-actavis-prometazyna-syrop-na-kaszel-16-uncji/
https://stonersmeds.com/es/categoria-producto/k2-papel-y-spray/
https://stonersmeds.com/nl/winkel/thca-kristallen-bovenste-plank-kopen/
https://stonersmeds.com/de/shop/kaufen-actavis-promethazin-hustensirup-16oz/
https://stonersmeds.com/de/shop/kaufen-crack-kokain-online/
https://stonersmeds.com/da/shop/kob-brun-heroin-99-ren-online/
cocaine te koop
comprar lsd online
research chemical kaufen
ψυχεδελικα μανιταρια αγορα
actavis promethazin
oxykodon prodej
μαγικα μανιταρια κιτ
mdma online kopen
lsd gdzie kupić
2023年9月19日 19:30
In the last several years, the demand for construction equipment auctions has grown enormously. It is one of the attractive places from where to buy equipments at reasonable prices. Construction equipment auctions are a fast and profitable method to liquidate construction equipments. Both new and used construction equipments are sold at these auctions with terms and conditions varying as per market conditions. cmd77
2023年9月23日 14:09
I appreciate your insights. Keep up the good work.I'm sharing this with my friends. Everyone should read this roof repairs dublin.
2023年9月25日 19:59
cheers, I thoroughly enjoyed scaning your post. I really appreciate your wonderful know-how and the time you put into educating the rest of us. Tautan Balik SEO Perjudian dan Kasino
2023年9月30日 06:05
https://stonersmeds.com/es/shop/comprar-alfa-pvp-online/
https://stonersmeds.com/es/tienda/comprar-alfa-pvp-online/
https://stonersmeds.com/es/shop/buy-4mmc-mephedrone-online/
https://stonersmeds.com/es/shop/buy-quality-methoxetamine-mxe-powder-online/
https://stonersmeds.com/es/categoria-producto/pastillas-de-extasis/
https://stonersmeds.com/es/
https://stonersmeds.com/es/categoria-producto/hachis-hachis/
https://stonersmeds.com/es/categoria-producto/cocaina/
https://stonersmeds.com/es/categoria-producto/k2-papel-y-spray/
https://stonersmeds.com/es/shop/buy-fentanyl-powder-online/
https://stonersmeds.com/es/shop/comprar-liquido-lsd-200ug-drop-online-2/
https://stonersmeds.com/es/shop/comprar-ketamina-en-polvo-online/
https://stonersmeds.com/es/tienda/comprar-liquido-lsd-200ug-drop-online-2/
https://stonersmeds.com/es/shop/comprar-thca-crystals-top-shelf
https://stonersmeds.com/es/shop/buy-fentanyl-tablets-online/
https://stonersmeds.com/es/tienda/comprar-thca-crystals-top-shelf/
https://stonersmeds.com/es/shop/comprar-3-fmc-polvo-investigacion-quimica-en-linea/
https://stonersmeds.com/nl/shop/koop-pure-mdma-kristallen-online/
https://stonersmeds.com/es/shop/comprar-lsd-100mcg-blotters-online/
https://stonersmeds.com/fr/categorie-produit/ecstasy-pills/
https://stonersmeds.com/fr/categorie-produit/cocaine/
https://stonersmeds.com/fr/shop/acheter-liquide-lsd-200ug-goutte-en-ligne-2/
https://stonersmeds.com/fr/shop/acheter-blotters-lsd-100mcg-en-ligne/
https://stonersmeds.com/fr/boutique/acheter-blotters-lsd-100mcg-en-ligne/
https://stonersmeds.com/fr/shop/acheter-thca-crystals-top-shelf/
https://stonersmeds.com/fr/categorie-produit/k2-papier-et-spray/
https://stonersmeds.com/fr/categorie-produit/produits-chimiques-de-recherche-et-sels-de-bain/
https://stonersmeds.com/fr/boutique/acheter-alpha-pvp-en-ligne/
https://stonersmeds.com/fr/boutique/acheter-liquide-lsd-200ug-goutte-en-ligne-2/
ttps://stonersmeds.com/fr/shop/acheter-des-cristaux-de-mdma-purs-en-ligne/
https://stonersmeds.com/fr/etiquette-produit/buy-synthacaine-powder-online/
https://stonersmeds.com/fr/shop/acheter-3-fmc-poudre-recherche-chimique-en-ligne/
https://stonersmeds.com/fr/shop/3-fma/
https://stonersmeds.com/fr/shop/psilocybe-azurescens-en-ligne/
https://stonersmeds.com/nl/shop/koop-pure-mdma-kristallen-online/
https://stonersmeds.com/da/shop/kob-crack-kokain-online/
https://stonersmeds.com/fr/tienda/3-fpm/
https://stonersmeds.com/fr/boutique/acheter-thca-crystals-top-shelf/
https://stonersmeds.com/fr/shop/acheter-liquide-lsd-200ug-goutte-en-ligne/
acheter mdma en ligne
thca achat
buvard drogue prix
mdma en ligne
cocaïne en ligne
acheter du lsd
spice, k2 achat
lsd liquide prix
sel de bain drogue achat
mdma legal kaufen
xtc online kopen
heroin online kaufen
mdma a vendre
psychedelika prodej
alfa-pvp hinta
ibogaine danmark
mephedron kaufen
comprar hachís marroquí
2023年10月13日 21:34
You there, this is really good post here. Thanks for taking the time to post such valuable information. Quality content is what always gets the visitors coming. 1xbet promo code South Africa
2023年10月14日 04:55
Willkommen im besten Online-Weed-Store in Deutschland,
in dem Sie Weed online kaufen können.
Wir bieten qualitativ hochwertige Cannabisprodukte zu erschwinglichen Preisen
https://wietgram.com/
https://wietgram.com/gras-kaufen/
https://wietgram.com/cannabis-kaufen/
https://wietgram.com/weed-bestellen/
Weed online kaufen.
Gras kaufen.
cali weed bestellen
cali weed kaufen
cannabis kaufen online
gras online kaufen in deutschland
gras online kaufen
2023年10月15日 00:57 1xBet Promo Code 2024: 248248 - this combination gives you an exclusive sports bonus that will add 100% to your first deposit of up to 130 €/$. Promo codes have become widespread in the gambling industry, including betting. In other words, game portals provide benefits and advantages to players under certain conditions. Such a sentence is usually encrypted in a combination consisting of numbers, letters and symbols. It is this combination that is a promo code. It is with this combination that users most often encounter when they are interested in the 1xBet bookmaker. 1xbet free promo code today
2023年10月16日 14:21 Use the 1xBet promo code for registration : VIP888, and you will receive a €/$130 exclusive bonus on your first deposit. Before registering, you should familiarize yourself with the rules of the promotion. 1xbet promo code Afghanistan
2023年10月16日 18:46 This was among the best posts and episode from your team it let me learn many new things. промокод 1xbet
2023年10月16日 18:56
Hey, great blog, but I don’t understand how to add your site in my rss reader. Can you Help me please? jasa seo murah
2023年10月16日 20:29 В букмекерской конторе 1xbet на сегодняшний день действует немало интересных акций, в рамках которых игрокам доступны различные бонусы и предложения. С их помощью игроки получают возможность повысить свои шансы на выигрыш. Благодаря бонусам игровой процесс становится более динамичным и увлекательным. 1xBet Промокод: Max2x промокод 1xbet tj
2023年10月16日 21:01 Use the 1xBet promo code for registration : VIP888, and you will receive a €/$130 exclusive bonus on your first deposit. Before registering, you should familiarize yourself with the rules of the promotion. 1xbet promo code india today
2023年10月17日 01:10 В букмекерской конторе 1xbet на сегодняшний день действует немало интересных акций, в рамках которых игрокам доступны различные бонусы и предложения. С их помощью игроки получают возможность повысить свои шансы на выигрыш. Благодаря бонусам игровой процесс становится более динамичным и увлекательным. 1xBet Промокод: Max2x 1xbet промокод
2023年10月17日 14:14 Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our. indocuan138
2023年10月17日 14:16
Thanks for the blog loaded with so many information. Stopping by your blog helped me to get what I was looking for. asiabet338
2023年10月18日 20:02 Use 1xbet promocode: LUCK48 to get an exclusive welcome offer. Fill out this form and your personal data at the registration stage, make the first deposit and receive your bonus reward. Find out how to make your betting useful and effective in our article. 1xbet promo code Bolivia
2023年10月19日 19:35
When i open the Give food to it provides me with many different garbled text, may be the concern on my small end? smm panel
2023年10月22日 13:40
I really appreciate the kind of topics you post here. Thanks for sharing us a great information that is actually helpful. Good day! ufabetทางเข้าเล่น
2023年10月23日 18:30 A very awesome blog post. We are really grateful for your blog post. You will find a lot of approaches after visiting your post. Buy TIkka Rifles
2023年10月23日 19:06
our bedding collections consists of beddings that come from new york and this are great bedding collections’ Amirdrassil Heroic Boost
2023年10月25日 14:01 I once had a bad encounter with a fake Bitcoin investment company, I lost a lot of money to the trading company Ceshiymfx popularly known as fast one. The account manager started ignoring my calls and the support stopped responding to emails. Found the company www.aldwychsecuritiesllc.com being recommended online by someone that got back their money back, I contacted. It took a while but it was worth it, got all my money back, 7btc. They are highly recommended. I never believe I would have gotten any money back but this company did amazing and helped me recover the funds https://www.aldwychsecuritiesllc.com
2023年11月06日 19:57
An impressive share, I simply with all this onto a colleague who was simply carrying out a little analysis for this. And that he in truth bought me breakfast since I ran across it for him.. smile. So i want to reword that: Thnx for the treat! But yeah Thnkx for spending some time to talk about this, I feel strongly concerning this and love reading regarding this topic. Whenever possible, as you become expertise, do you mind updating your blog post with an increase of details? It truly is highly a good choice for me. Big thumb up due to this post! smm panel
2023年11月06日 20:31 That is really nice to hear. thank you for the update and good luck. Buy Marijuana Online in Virginia
2023年11月15日 03:32
It is the intent to provide valuable information and best practices, including an understanding of the regulatory process. Market Trends in the UK
2023年11月18日 22:16
If you don"t mind proceed with this extraordinary work and I anticipate a greater amount of your magnificent blog entries windrawwin
2023年11月19日 18:36 I was surfing the Internet for information and came across your blog. I am impressed by the information you have on this blog. It shows how well you understand this subject. Roofing Allen Texas
2023年11月20日 15:07
I will love you guys to try this sports prediction website with accurate soccer prediction tips. They post free tips every day. here is windrawwin that offers free betting tips you should all try out
2023年12月01日 13:45 Wow i can say that this is another great article as expected of this blog.Bookmarked this site.. rtp wifitoto
2023年12月01日 13:49
Great survey. I'm sure you're getting a great response. Kenzo188
2023年12月05日 06:42
DarkWeb.Link's coverage of the role of cryptocurrencies in dark web transactions becomes a financial analysis, unraveling the intricate web of digital currencies that facilitate illicit exchanges.
2023年12月07日 05:38
Thanks for a very interesting blog. What else may I get that kind of info written in such a perfect approach? I’ve a undertaking that I am simply now operating on, and I have been at the look out for such info. neutral color palette
2023年12月10日 16:08
It proved to be Very helpful to me and I am sure to all the commentators here! UFABETกติกาแทงบอล
2023年12月14日 14:22
I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often. sâm hàn quốc
2023年12月18日 13:03
I truly like you're composing style, incredible data, thankyou for posting. Kijangwin
2023年12月19日 14:07
Its a great pleasure reading your post.Its full of information I am looking for and I love to post a comment that "The content of your post is awesome" Great work. bpvideo
2023年12月19日 14:08
Great survey, I'm sure you're getting a great response. lawyer jogja
2023年12月23日 18:34
I was surfing the Internet for information and came across your blog. I am impressed by the information you have on this blog. It shows how well you understand this subject. All inclusive holidays to Spain
2023年12月26日 13:50
Your music is amazing. You have some very talented artists. I wish you the best of success. Yomovies
2024年1月18日 15:04
Nice knowledge gaining article. This post is really the best on this valuable topic. research chemicals kaufen
2024年1月28日 14:13 Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained! https://link-mpo234.pages.dev/
2024年1月28日 14:18
I have read all the comments and suggestions posted by the visitors for this article are very fine,We will wait for your next article so only.Thanks! https://joker188-alt.pages.dev/
2024年1月31日 18:49 It is a great website.. The Design looks very good.. Keep working like that!. yomovies