@botsgram_cu · Post #3076 · 17.10.2020 г., 15:31
¿Que puede hacer este bot? @RenameArchive_bot Con este bot podrás renombrar archivos de Telegram Idioma: inglés (Visto en @botsgram_cu) #renombrar#archivos
Hashtags
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
Пребарај: #archivos
@botsgram_cu · Post #3076 · 17.10.2020 г., 15:31
¿Que puede hacer este bot? @RenameArchive_bot Con este bot podrás renombrar archivos de Telegram Idioma: inglés (Visto en @botsgram_cu) #renombrar#archivos
Hashtags
@botsgram_cu · Post #4272 · 21.08.2021 г., 17:26
¿Que puede hacer este bot? @uploadgrammebot Este es el bot oficial de uploadgram.me ¡Envíale un archivo y te dará su enlace directo de descarga! Idioma: inglés (Visto en @botsgram_cu) #enlaces#descarga#archivos
@botsgram_cu · Post #2998 · 06.09.2020 г., 20:06
¿Que puede hacer este bot? @filestolinkebot Este bot puede convertir archivos a enlaces Idiomas: inglés (visto en @botsgram_cu) #enlaces#archivos#descarga
@botsgram_cu · Post #4335 · 05.09.2021 г., 13:58
¿Que puede hacer este bot? @DegooUploaderBot Con este bot puede cargar archivos de Telegram y enlaces de descarga directa a su almacenamiento en la nube degoo. Idiomas: inglés (Visto en @botsgram_cu) #archivos#degoo
@botsgram_cu · Post #4419 · 09.10.2021 г., 11:01
¿Que puede hacer este bot? @Tgfilestore_bot Almacene y comparta archivos con URL permanente. Idiomas: inglés (Visto en @botsgram_cu) #enlaces#archivos#nube
@botsgram_cu · Post #3759 · 02.04.2021 г., 15:06
¿Que puede hacer este bot? @UnzipRobot Extrae archivos comprimidos dentro de Telegram con soporte permanente de miniaturas. Idiomas: Inglés (Visto en @botsgram_cu) #unzip#archivos#enlaces
@botsgram_cu · Post #3073 · 17.10.2020 г., 00:27
¿Que puede hacer este bot? @cloudy_files_bot Este es un bot de servicio en la nube. Le permite administrar archivos y descargarlos. Idiomas: inglés (Visto en @botsgram_cu) #descargas#nube#archivos
Hashtags
@botsgram_cu · Post #2961 · 12.08.2020 г., 01:29
¿Que puede hacer este bot? @tg_renamer_bot Este es un bot de cambio de nombre de archivo de telegram personalizado, con soporte de miniatura Idiomas: inglés (visto en @botsgram_cu) #archivos#renombrar#miniaturas
Hashtags
@botsgram_cu · Post #4992 · 28.04.2024 г., 21:33
¿Qué puede hacer este bot? @complete_pdf_bot Si eres alguien que pasa mucho tiempo trabajando con archivos PDF de Telegram, 𝐈 💔 𝐏𝐃𝐅 es una herramienta imprescindible. Este bot simplifica a los usuarios convertir archivos hacia y desde formato PDF, editar, fusionar, dividir, comprimir e incluso convertir imágenes a PDF o viceversa. #pdf#imagenes#archivos (Visto en @BotsGram_Cu)
@botsgram_cu · Post #4971 · 10.04.2024 г., 21:59
¿Qué puede hacer este bot? @FILEs_COMPRESSOR_BOT Este bot le permite comprimir archivos en archivos zip y administrarlos. Idioma: Inglés #archivos#compresion#zip (Visto en @BotsGram_Cu)
Hashtags
@botsgram_cu · Post #4490 · 16.11.2021 г., 22:22
@TG_UnZipperBot ¿Qué puede hacer este bot? Extrae archivos zip, tar, 7z, tar.xz, etc Idioma: Inglés 🇬🇧 (Visto en @BotsGram_cu) #unzip#extraer#archivos
@botsgram_cu · Post #4250 · 16.08.2021 г., 18:26
¿Que puede hacer este bot? @TheFileShareBot Guarde y comparta archivos, obtenga un enlace permanente de Telegram. Idiomas: inglés turco (Visto en @botsgram_cu) #archivos#herramientas#compartir#anónimo