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

Резултати

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

Пребарај: #mssqlserver

当前筛选 #mssqlserver清除筛选
MDC Uzbekistan

@mdcuzbekistan · Post #227 · 26.11.2021 г., 09:44

#dotnet#middle#MSSQLserver Applied Labs is looking for a .Net Developer Salary: $1500-3000 Location: 100% remote job, but we have an office in Tashkent, if you feel comfortable working from the office. All stages of recruitment are carried out remotely by calling a video (Zoom). You will need to have: - Proficiency in C #, .NET Framework and .NET Core; - Understanding how web protocols (HTTP, HTTPS) and REST / SOAP API work; - Knowledge of MS SQL Server, Oracle, PostgreSQL: the ability to design a database structure, write and optimize SQL queries and stored procedures; - 3+ years of work experience; - Fluency in English (verbal and written communication); - Bachelor's Degree in Computer Science, Engineering or related field or strong track record proving the equivalent level of experience; - Capability to multi-task with strong attention to detail; - Ability to work in a fast-paced, agile environment and resolving unplanned incidents quickly; - Outstanding communication skills, including the ability to effectively present information in both technical and non-technical terms and train users using non-technical terms; - Strong customer service focus; - Excellent team player skills with the ability to influence others. It would be an added bonus if you have: - Azure, Azure DevOps ; - M365 is a huge plus; - Jira and Confluence; - MS Graph API’s. We would love to see: - A sound knowledge of software engineering; - Excellent analytical skills; - Sourcing requirements from customers and suggesting appropriate solutions; - Quick generating of POC (proof of concepts) and demos; - Self-motivated, proactive, independent & responsive candidate, the specialist, who requires little supervisory attention We offer: - Flexible office policy - You can work from wherever you want or from our cozy office in Tashkent. You can even combine both - few days in the office and a few days remote; - 5/2 work week, 8 hours a day (you are expected to be available for communication between 18:00 to 23:00 Tashkent time, as you'll be working with the US team located in New York); - Official employment in accordance with Uzbekistan's Labor Laws; - Frequent team-building activities and internal hackathons; - Health insurance; - English courses; - Group exercises; - Reimbursement for sport. Send an email with your resume in English and the subject line "Data Engineer" to [email protected] To apply for this position, please feel out the application form here: https://appliedlabs.pinpointhq.com/en/jobs/32045 👉Подписаться на канал @UzDev_Jobs