SShortSingh.
Back to feed

StayPresent lets developers run multiple Python bots in a single process with independent crash recovery

0
·1 views

StayPresent is a Python library that allows developers to run multiple bots — such as Telegram or Discord bots — within a single process using one staypresent.run() call. Each bot operates as an independent subprocess with its own restart counter and monitoring thread, meaning a crash in one bot does not affect the others. Developers can configure bots either via a simple list of file paths or through a detailed bots parameter that supports per-bot arguments and environment variables. The library validates all bot files before launching and handles startup failures cleanly by terminating any already-started processes to avoid orphaned instances. Once all bots finish or permanently fail, StayPresent returns a deterministic exit code based on the lowest-indexed failing bot, making it easier to manage multi-bot pipelines under a single deployment.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Claude Code Gets Live SEO Data via MCP: Hosted vs Local Server Compared

A technical guide published on DEV Community explains how to connect Claude Code, Anthropic's coding agent, to live search engine results pages (SERP) data using the Model Context Protocol (MCP). The guide addresses a core limitation: Claude Code can reason about SEO but cannot independently retrieve current search rankings without a dedicated data tool. Two MCP transport methods are compared — a hosted HTTP server operated remotely over HTTPS, and a local stdio server running as a child process on the developer's own machine. Both approaches are tested against identical query parameters including location, language, device, and output format to produce a reproducible comparison record. The guide notes that neither transport is universally superior, with hosted servers offering easier team access and local servers providing greater control over versioning and secret exposure.

0
ProgrammingDEV Community ·

Solon Framework Offers Lightweight I18n Module With Three Built-In Locale Resolvers

The Solon Java framework has introduced an internationalization (i18n) module designed to eliminate boilerplate configuration typically associated with localization setups. The module relies on three built-in locale resolvers — header-based, cookie-based, and session-based — along with a single annotation and a utility class. Developers place standard Java properties files under a resources/i18n directory, and Solon discovers them automatically without requiring bean declarations or XML configuration. For cases where the built-in resolvers are insufficient, the framework allows custom resolver implementation via the LocaleResolver interface. Template engines including Freemarker, Thymeleaf, Beetl, and Enjoy are supported through the @I18n annotation, which injects an i18n variable directly into views.

0
ProgrammingDEV Community ·

Why Self-Serve Onboarding Is the Only Scalable Growth Model for Bootstrapped SaaS

Bootstrapped SaaS founders often blame poor conversions on pricing or product-market fit, but the real culprit is frequently broken onboarding. Without a sales team to guide trial users, self-serve onboarding becomes the only viable path to scalable growth, as founder-led demo calls create a hard ceiling on conversions. A self-serve funnel converting at just 5% across 1,000 monthly signups can yield 50 paid customers with no sales effort, outpacing even a generous sales-led approach. Key audit areas include reducing signup form fields to three or fewer, enabling one-click social login, and minimizing the time it takes new users to experience core product value. Companies like Posthog and Plausible Analytics scaled past $1M ARR primarily through self-serve, investing in making their products self-explanatory rather than building early sales teams.

0
ProgrammingDEV Community ·

Manticore Search 25.12.0 Adds facet_filter_mode for Smarter Filter Panels

Manticore Search version 25.12.0 has introduced a new feature called facet_filter_mode, designed to simplify how e-commerce filter panels recalculate available options after a user applies one or more filters. Previously, developers had to manually construct near-identical queries for each facet attribute such as color, size, brand, and availability to keep the filter panel accurate and usable. The new API allows a single query to define how each facet should inherit filters from the main search query, reducing redundant code. Three inheritance modes are available: strict, which mirrors the current result set; auto, which excludes the facet's own filter to show switchable options; and max, which calculates buckets over a broader base and labels values as selected, available, or unavailable. The feature is accessible through both SQL syntax and the JSON API, with an additional zeroes option introduced in version 27.3.0 to preserve zero-count buckets in max mode.

StayPresent lets developers run multiple Python bots in a single process with independent crash recovery · ShortSingh