TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #425 · 20 апр.

Недавно делал быстрый прототип асинхронного приложения в котором требовалось вызывать много синхронного кода. Да, я знаю, что это не лучший дизайн, но нужно было быстрое решение на один процесс и без очередей. Поэтому я выполнял код в потоках. Выглядело это примерно так: from fastapi.concurrency import run_in_threadpool async def execute(data: DataRequest) -> DataResponse: try: result = await run_in_threadpool(sync_function, data) return DataResponse(data=result) except Exception as e: return DataResponse( error=str(e), success=False, ) В общем работает нормально. Для всех вызовов под капотом используется общий тредпул, всё работает предсказуемо. Но потребовалось изменить количество запускаемых в пуле потоков (по умолчанию создается 40 воркеров). Так как дело происходит с FastAPI, делается это через lifespan используя настройки anyio: import anyio @asynccontextmanager async def lifespan(app: FastAPI): limiter = anyio.to_thread.current_default_thread_limiter() limiter.total_tokens = 100 yield # если вдруг нужно вернуть обратно limiter.total_tokens = 40 Зачем менять количество воркеров? - уменьшить, если оперативки мало (один тред занимает ~8мб) - увеличить чтобы выдержать нагрузку Если есть предложения получше при тех же вводных - предлагайте😉 #async

Hashtags

Резултати

Пронајдени 16 слични објави

Пребарај: #miniapp

当前筛选 #miniapp清除筛选
BLC Market - mini-app BulCoin

@bulcoin_blc · Post #212 · 11.06.2025 г., 21:00

Council of Major Holders has approved the application name as BLC Market Near-term plans: To present you the project pitch Submit the project to contests and investment platforms You can become one of the early investors by buying BulCoin #miniapp FAQ | BUY

Hashtags

Совет Крупных Держателей утвердил название приложения как BLC Market Ближайшие планы: Продемонстрировать вам питч проекта Подать проект на конкурсы и инвест площадки Вы можете стать одним из раних инвесторов купив BulCoin #miniapp FAQ | Купить

Hashtags

UXLINK

@uxlink_community · Post #67 · 04.12.2024 г., 09:10

UXLINK MiniAPPをLINEでリリースしてから35日が経ち、LINE の新規#UXLINKユーザーが50万人を超えました。コミュニティの皆さんの多大なサポートに感謝します! ❤️ Releasing UXLINK #miniapp on LINE for 35 days , new #UXLINK users on @_LINEFRIENDS has just exceeded 500,000. Thanks to the community for your great support! 🫶

Wukong 🙈

@wukongcm · Post #45 · 16.11.2024 г., 10:22

✅The path to power has opened. Are you ready to begin your journey to earn Wk? ➡️ Play now: https://t.me/bmwukongbot/join?startapp=L29WAAMR #Wukong#Miniapp

AppPie

@AppPie · Post #2570 · 13.11.2025 г., 17:11

#Apple Apple 推出 App Store Mini App Partner Program Mini App Partner Program 进一步扩展 App Store 对那些提供小程序的 App 的持续支持。小程序是使用 HTML5 和 JavaScript 等网页技术构建的独立体验。这项计划旨在帮助那些托管小程序的开发者拓展业务,进一步提升小程序在 App Store 上的销售范围,同时仍提供出色的顾客体验。 参与计划的开发者在销售符合条件的 App 内购买项目时,可享受 15% 的收益抽成减免。要符合享受这一收益抽成减免的条件,参与计划的 App 必须支持某些 App Store 技术,包括 Declared Age Range API 和 Advanced Commerce API,以便为所有年龄段的顾客提供安全流畅的体验。 #AppStore#MiniApp 📮 频道 @AppPie

Blink Game AI

@blink_en · Post #21 · 28.10.2024 г., 12:01

🎉 Blinkers, your memes are on fire! Each new post makes us smile even more — keep up the great work! Reminder: the best memes will win 2000 $BLINK and 10 USDT! Our community is still growing, so your chances of winning are high. 📅 Deadline: October 30. If you haven’t joined yet, now’s the time to show off your creativity! How to participate: 1. Create funny memes about blinking (post as many as you like!). 2. Share them on Twitter with the hashtags #BLINKMEMECONTEST and #MiniApp, and tag our Twitter account @blinkgameapp. Show us your creativity, and we’ll make sure to notice you! ❤️ Open Blink Game AI: Blink and Earn! 💵 ENG Chat | RU Chat Twitter | Discord | Instagram | YouTube | TikTok | CIS TG

Blink Game AI

@blink_en · Post #18 · 26.10.2024 г., 17:16

🤑Create a funny blink meme and earn 2000 $BLINK and 10 USDT! Join our meme contest and show off your sense of humor! Memes, GIFs, videos — anything that makes us and your followers laugh and supports the idea of our app. How to participate: 1. Create a creative meme on the theme of blinking and Blink Game AI. 2. Post it on your Twitter with the hashtags #BLINKMEMECONTEST and #MiniApp, and tag our Twitter account @blinkgameapp. 💵 The creators of the 10 funniest memes will receive 2000 $BLINK and 10 USDT each. Contest period: 26.10.2024–30.10.2024 Time to shine — let the world see your creativity! Open Blink Game AI: Blink and Earn! 💵 Twitter | Discord | Instagram | YouTube | TikTok | CIS TG

💱Bitget Wallet Lite & TonCapy Collaboration For the first round, Bitget Wallet Lite X TonCapy bring you $10,000 worth of TON tokens in rewards! Complete simple tasks to claim rewards: 1. Login mini-app & go to task menu 2. Invite friends to this event 3. Follow Toncapy on X 4. Join TonCapy Telegram 5. Visit TonCapy mini-app 6. RT post on X 📖Event Details: - Hold at least 3,500 KeyShards to enter a lucky draw where 500 winners will share $2,000 TON! - Invite at least 1 new user to complete the tasks and get a chance to share an additional $8,000 TON! 🕰Dec 12, 16:00 – Dec 19, 16:00 (UTC+8) TON token rewards will be distributed after the event ends. 🫡 Invite your friends now and experience the new invitation mechanism! Join the event, earn 🔑KeyShards, and win #TON! #BitgetWallet#Airdrop#MiniApp

TONlines – News

@tonlines · Post #7444 · 29.05.2025 г., 18:46

Trending Apps: Discover the Dynamic World of ArtiTap #ArtiTap#MiniApp#NFT Trending Apps introduces ArtiTap, a compelling RPG that emphasizes arena combat. With a full PvE campaign, PvP duels, NFT Operators, and a strong in-game economy, ArtiTap offers an immersive experience for players aiming to become champions. Source: link @tonlines

😊Memecoin Spot Trading is Now Live on Vanilla Finance on Telegram! Start spot trading your favorite memecoins on #VanillaFinance today! The #1 Trading Volume exchange on Telegram. We’re the 1st Exchange to bring you: 🪙 Memecoin Spot Trading ⚡️ 10,000x Leverage ❌ No Liquidation Risk ↗️ Exciting memecoin trading events are on the way! Stay tuned for upcoming massive reward events 🎁 ❤️ Join Vanilla mini-app now and try spot trading! #meme#miniapp#telegram#web3

SingSing Announcement

@singsingchannel · Post #750 · 02.08.2024 г., 14:10

Treasure Wheel Week 7 - Winners Announcement🎉🎉🎉 🎉 Congratulations to the Winners of Treasure NFT Week 7! Each of you will receive 0.002 ETH + 100 RUBY for each winning NFT. The winning NFTs are inX Post. To claim your reward: 1️⃣ Post a tweet on your X account with a picture of your winning NFT, including the following content: "I am a Treasure NFT Holder who won in the Treasure Wheel Week 7 event with RUBY and ETH rewards. Come and join me at: https://t.me/SingSing_TG_bot #SingSing#MiniApp#NFT#TreasureWheelWeek7#RUBY#ETH" 2️⃣ Fill in the post link, your SingSing Mini App wallet address and your NFT ID in this form The form will close on Wednesday, and you can claim your reward starting on Thursday. The claim period is 2 weeks. Note: You can only claim if you complete all the above steps.

12
ПретходнаСтраница 1 од 2Следна