Migrating from Celery to Temporal Standalone Activities

Moving Python Celery tasks onto Temporal Standalone Activities is mostly a mapping exercise for delay, get and retries, with real work in idempotency, worker deployment and cutover. This page explains what maps cleanly and what needs planning.

On this page

What moving from Celery to Temporal Standalone Activities involves

The effort depends mostly on how many Celery tasks you run and how many of them have side effects, so start by inventorying your tasks before you estimate anything. The move converts each Celery task into a Standalone Activity that a Temporal Worker runs, and it replaces the .delay() and .get() calls your code makes today with calls that start Standalone Activities from a Temporal Client. Temporal's Celery migration guide describes this path, and it runs synchronously where your code waits for a result and fire-and-forget where it does not. Celery retry settings move into a Retry Policy on the Activity, so each retry setting needs a matching policy that you review on purpose rather than copy by name.

Most of the work is mapping and review, not rewriting. For each task you need to decide the Task Queue it belongs on, whether the caller needs the result, what timeouts apply, and whether the task is idempotent. Idempotency review matters most, because a Standalone Activity that is retried can run its side effects again, so tasks that charge a card, send an email or write to an external system need a deduplication key or a check before they act. The rest of the cost comes from deploying Temporal Workers, running Celery and Temporal side by side during a parallel run, and comparing results for the same inputs before you switch traffic. Confirm the exact tasks, retry behavior and Task Queue layout in the Temporal guide before you commit to a plan, and ask any partner for a quote built from your task inventory.

Which Celery features map to Temporal and which need redesign

This table compares Celery features with their Temporal equivalents, showing where a single task can move into a Standalone Activity and where chaining, scheduling or state needs Workflows or other Temporal features. Read each row as a question to answer in your codebase before you convert a task. Confirm specifics against the Temporal Celery migration guide.

Celery featureTemporal equivalentMigration note
Task function run by a workerStandalone Activity run by a Temporal WorkerUsually a direct replacement when the task is one unit of work that can be retried safely
delay() to enqueue a taskClient call that starts a Standalone Activity, fire-and-forgetConfirm that the caller does not need a result, since no Workflow tracks the outcome
get() to wait for a resultClient call that starts a Standalone Activity and waits for its resultSynchronous use is a direct mapping, but long waits belong in a Workflow
Chained tasks or canvas (chain, chord, group)Workflow that calls Activities in order or in parallelNeeds redesign: a Standalone Activity has no built-in orchestration of other tasks
Countdown, eta and periodic beat schedulesWorkflow timers, Schedules or a Workflow that sleepsNeeds redesign: choose the Temporal feature that matches recurrence and durability needs
autoretry and retry settingsRetry Policy on the Standalone ActivityMap max attempts, backoff and non-retryable errors explicitly, and review every task that relied on Celery defaults
Named queues and routingTask Queues served by WorkersPlan which Worker pools serve each queue and what concurrency each one needs
Result backend storing task stateActivity result visible through Client calls and Temporal visibilityConfirm which results must persist for callers, and whether payload size or encryption needs a codec
Flower monitoring of tasksTemporal Web UI and visibility searchCheck which Flower views your operators use, then confirm the matching visibility queries and store choice

Documented migration paths and APIs for Celery teams

Temporal documents one conversion path for Celery teams: a Celery task becomes a Standalone Activity run by a Temporal Worker. No automated Celery importer appears in the supplied sources, so the move is code work that your engineers own, and each card below names one piece of that work to plan before you start.

Temporal Python SDK client

The Temporal Client starts Standalone Activities directly, without a Workflow, and replaces the calls your code makes today with .delay() and .get(). Check which call sites need a result returned synchronously and which can be fire-and-forget, because that choice decides how your callers handle failure and timeouts. Confirm the SDK version your team will pin before writing wrappers.

Celery migration guide

Temporal Worker and task queues

A Temporal Worker polls a Task Queue and runs the Activity code you move out of Celery workers. Map each Celery queue to a Task Queue deliberately, since worker concurrency and deployment are set per Task Queue. Plan how Celery worker processes become Temporal Worker processes, including graceful shutdown so in-flight Activities finish during deploys.

Temporal guide as the conversion path

Temporal's guide describes converting a Celery task into a Standalone Activity, executing it synchronously or fire-and-forget, and moving retries to a Retry Policy. Use it as the reference for each conversion pattern, then record your own exceptions. Treat the guide as the documented path, not as a script that rewrites your codebase.

Read the guide

Retry Policy configuration

Celery retry settings such as max_retries and countdown have no direct one-to-one copy. A Temporal Retry Policy sets the initial interval, backoff coefficient, maximum interval, maximum attempts and non-retryable error types for each Activity. Review every task that relies on Celery's automatic retries, because a missed non-retryable error type can repeat side effects such as payments or emails.

Temporal visibility APIs

Flower showed Celery task state from the broker and workers. Temporal visibility lists and filters executions through its own APIs and the Web UI, which depend on a visibility store. Confirm which visibility store your deployment uses, since self-hosted advanced visibility runs on Elasticsearch, OpenSearch or SQL databases, and decide which task states your dashboards and alerts must query.

Visibility docs

Self-hosted or Temporal Cloud service

Your workers connect to a Temporal Service, either one you run in your own infrastructure or Temporal Cloud. Self-hosted services need a configured Authorizer, since the default noopAuthorizer allows every API request. Decide where the service runs, who operates it and how workers authenticate before you move the first Celery task.

Self-hosted security docs

How a Celery to Temporal cutover runs in phases

The sequence moves Celery work onto Temporal in controlled stages, so each task type is proven on Temporal before Celery stops handling it. Each phase ends with a check that the team can sign off on before moving to the next.

  1. Confirm server version and persistence setup

    The platform owner confirms which Temporal Server version and which persistence and visibility stores the cluster will run, and checks them against the supported combinations in Temporal's persistence and visibility documentation. Where the server is self-hosted, the team checks the current minor line against the upgrade guidance and confirms the schema upgrade order before any task moves. The step closes with a written record of the server version, database and visibility store that the pilot will use, and an agreed plan for any upgrade that must happen first.

  2. Inventory tasks and their idempotency

    The engineers who own each Celery application list every task with its queue, callers, inputs, side effects, retry settings, time limits and any use of delay or get calls. They mark each task as idempotent, idempotent with a key, or not safe to repeat, because retries behave differently under a Retry Policy. Tasks that call external systems without a deduplication key are flagged for redesign before migration. The step ends with a reviewed inventory that assigns each task a migration order and an owner.

  3. Build the Standalone Activity worker and pilot one queue

    The team converts the chosen non-critical Celery task into a Standalone Activity, runs it on a Temporal Worker in a non-production namespace, and starts it from a Temporal Client in place of the existing delay call. They map the Celery retry settings to a Retry Policy and confirm that results, failures and timeouts reach the callers as expected. The pilot is complete when the task runs end to end on a non-critical queue, its failure paths have been exercised, and the owners have compared its output with the Celery version.

  4. Set up Temporal visibility and alerts

    Before production traffic moves, the operations team configures visibility queries for the pilot task type and builds the dashboards and alerts that replace the views Flower provided, such as task status, failures and queue backlog. They confirm that visibility data is retained long enough for support investigations and that access to it follows the team's identity controls. The step closes when the team can find a sample of pilot executions by status and can see a deliberately failed execution raise an alert.

  5. Run Celery and Temporal in parallel

    The team runs both systems at once, either by giving each task type to one system or by routing a defined slice of traffic for the same task type to Temporal. Owners compare outputs, retry counts, latency and error rates between the two paths and log every difference. Any task that produces duplicate side effects is returned to the redesign list before it advances. The parallel run ends when the owners agree that the results match for each task type in scope.

  6. Cut over task types one at a time

    The team moves one task type at a time from Celery to Temporal, starting with the lowest-risk types from the inventory. For each move, they stop new enqueueing to Celery for that type, let in-flight Celery work drain, and confirm that the Temporal path handles the traffic. A rollback route back to the Celery task is kept until the owner of that task type signs off. The cutover of each type is complete when no new work for it reaches Celery and its alerts remain quiet through the agreed review period.

  7. Decommission Celery and Flower after checks pass

    Once every task type runs on Temporal and the visibility checks hold, the team removes the Celery workers, beat schedules and broker connections for those tasks, then shuts down Flower and its access routes. Broker data is retained or archived according to the team's records policy before the broker is removed. The team records the final state, including which Temporal visibility views now serve operations. The phase closes when no Celery worker or Flower instance is running and the inventory shows every task as migrated or retired.

How Standalone Activities change task execution

In Celery, a task is queued by a producer calling .delay() or .apply_async() and the broker holds it until a worker picks it up. In Temporal, the equivalent unit is a Standalone Activity: the Temporal Client starts it directly, with no Workflow around it, and a Temporal Worker polling the task queue runs it. Temporal documents Standalone Activities as its job queue, and they use fewer resources than wrapping a single Activity in a Workflow, which matters when you are moving a large number of one-shot tasks. The migration changes the calling pattern as well as the runtime. Where your code called .delay() and forgot the result, you start the Activity and continue, which is the fire-and-forget mode. Where your code called .get() and blocked, you start the Activity and wait on its handle for the result, which is the synchronous mode. Decide per call site which behavior the business logic actually depends on before you convert anything.

Retries change most of all. Celery's autoretry_for, max_retries and retry_backoff settings move into a Retry Policy on the Activity options. Confirm the exact retry fields and defaults in Temporal's own documentation before you write the policy, and decide which error types should be non-retryable, because a bad input will fail the same way on every attempt. Retry behavior also makes idempotency a hard requirement. Temporal may run an Activity more than once if a worker crashes or times out before reporting completion, so any Activity that charges a card, sends an email or writes a row must check whether the work already happened, typically with a stable business key. This is a code review item, not a configuration setting, and it is easy to miss in tasks that were written casually for Celery.

A Standalone Activity handles one unit of work well, but it cannot hold state across steps or decide what runs next. If a Celery chain or a group with a callback encodes a sequence such as reserve funds, then post a ledger entry, then notify a customer, that sequence belongs in a Workflow, where each step is an Activity with its own Retry Policy and the Workflow records progress durably. Keep the boundary explicit in your inventory: a task that is a single call with an independent result is a candidate for a Standalone Activity, while a task that depends on the outcome of earlier steps, waits for a human, or runs for a long time with timers needs a Workflow. Whichever you choose, the code the Activity runs will be retried, so write it to tolerate repeated execution from the start.

What drives the cost and duration of the move

This table lists the factors that change how much work a Celery to Temporal move takes, who carries each part of that work, and what to ask for in a quote. Read each row against your own Celery estate, then use the rows to build a written scope before any partner or internal team commits to a timeline.

DriverWhy it changes effortHow to keep it down
Number and variety of Celery tasksEach task needs a Standalone Activity, a worker registration and a tested call site. Tasks with unusual arguments, custom serializers or bound task behavior take longer.Inventory tasks first, group similar ones, and migrate low-risk tasks before the complex ones.
Chains, chords and groupsCelery canvas primitives have no direct one-to-one equivalent, so each one needs a deliberate Workflow or Activity design and its own tests.Count canvas uses in the inventory and ask for a per-pattern design in the quote.
Periodic beat schedulesBeat entries must be recreated as Temporal Schedules or equivalent triggers, and missed-run and overlap behavior must be checked against the old schedule.List every beat entry with its timing and overlap expectations before design starts.
Idempotency of side effectsRetries in Temporal re-run Activities. Tasks that charge, send email or write external records need idempotency keys or guards, which often means code changes beyond the port.Mark non-idempotent side effects early and budget review time for each one.
Result backend dependenceCallers that call .get() or read stored results must be redesigned around returned values, Workflow results or a separate store. This changes the caller side as well as the worker side.Find every caller of AsyncResult or result backend reads and decide the replacement pattern for each.
Flower dashboards and alertsFlower views and alert rules must be rebuilt on Temporal visibility queries and your metrics stack. Each dashboard or alert the business relies on is extra scope.Export the list of dashboards and alerts in use and keep only those with a named owner.
Number of worker deployments and secretsEach Celery worker pool becomes a Temporal Worker deployment with its own configuration, scaling and secrets. More pools and more secrets mean more deployment and access work.Consolidate pools where safe and map secret access per worker before the quote.
Self-hosted Temporal or Temporal CloudSelf-hosting adds work for the cluster, persistence, visibility store, upgrades, TLS, authorization and monitoring, and those costs are paid by your team or the partner. Temporal Cloud moves service operation to Temporal Technologies but still needs connectivity, identity and cost planning. Temporal Cloud pricing is published on the Temporal pricing page with pay-as-you-go rates per million actions.Decide the hosting model before design, and ask each option to be priced as a separate line in the quote.

Questions teams ask before moving Celery tasks to Temporal

What does moving Celery tasks to Temporal cost, and what drives it?

The cost is mostly the engineering time to convert tasks, rebuild retry and timeout logic, stand up Temporal and replace monitoring, plus the infrastructure to run the Temporal Service and workers. The main drivers are the number of task types, how many call chains depend on .get() or chained results, how much custom retry behavior exists, and whether you self-host or use Temporal Cloud. Self-hosting shifts cost to the infrastructure and operations you own, including databases and upgrades. Temporal Cloud is priced on actions, with pay-as-you-go starting at 50 US dollars per million actions, plus storage and optional support tiers, so ask for a quote that models your expected action volume. Your quote should separate one-time conversion work from recurring hosting and support.

How long does a Celery to Temporal migration take?

Duration depends on how many tasks you have, how tightly they are coupled to callers, and how much of the Temporal platform is new to your team. Simple fire-and-forget tasks with standard retries convert quickly, while tasks that return results to a caller, sit inside multi-step pipelines or depend on custom broker behavior take longer to redesign and test. Platform work, including choosing a persistence database, deploying workers, setting up authentication and building dashboards, often runs in parallel with conversion. Ask any partner for a phased plan that lists task groups, the order of migration and the test criteria for each group. Timelines should come from the written scope, not from a generic estimate.

What does our team need to provide before the migration starts?

You need an inventory of Celery tasks, their queues, retry settings, time limits and callers, plus the broker and result backend configuration. Engineers who own the Python code need to explain side effects, idempotency and any tasks that must not run twice. Platform owners need to confirm where Temporal will run, which database and visibility store are approved, how workers will be deployed, and who will operate the service. Security and compliance teams should state requirements for network exposure, authentication, payload data and audit logging. Access to a non-production environment with representative data is essential for testing.

Can our in-house team migrate Celery tasks to Temporal without a partner?

An experienced Python team can convert simple tasks in-house, especially if one or two engineers take the Temporal training path first. The harder parts are design decisions that Celery never forced you to make: deciding which work is a Standalone Activity, which needs a Workflow, how to keep activities idempotent and how to run workers and the Temporal Service reliably. If no one on the team has operated a stateful distributed service, the operational risk is higher. A fixed-scope engagement with DeployOpen can cover design, implementation, hardening and documentation inside your infrastructure, leaving your team able to run it afterward. Compare both options against the same written scope.

How do Celery retries and timeouts map to Temporal?

In the Temporal migration guide, Celery retries move into a Retry Policy set on the Standalone Activity. You configure the initial retry interval, backoff coefficient, maximum interval, maximum attempts and non-retryable error types, which replace the max_retries and retry_backoff style settings in Celery. Timeouts also need explicit values: the schedule-to-close and start-to-close timeouts define how long an activity may run in total and per attempt. Celery code that relied on implicit broker redelivery needs review, because Temporal retries are governed by the policy you set. Test each task type with forced failures to confirm that retry counts and timing match the design.

What happens to Flower and our Celery monitoring?

Flower is replaced by Temporal visibility: the Temporal Web UI and the visibility API show workflow and Standalone Activity executions, their status, history and search attributes. Visibility needs an advanced visibility store for anything beyond a small number of executions, and Elasticsearch or OpenSearch is recommended for larger volumes. Your alerting moves too, so you need metrics from the Temporal Service and workers, plus alerts for failed executions, stuck tasks and worker backlog. Define which custom Flower views and dashboards matter to operators before cutover, then rebuild them as search attributes and Grafana or other dashboards. Confirm your monitoring stack and retention needs before choosing the visibility store.

How do we run Celery and Temporal in parallel without double execution?

Run both systems in parallel by moving one task type at a time, so each task has exactly one owner at any moment. Route new executions of a migrated task only to Temporal, let Celery drain tasks already queued, and stop Celery workers for that task type only after the queue is empty. Make every task idempotent before the switch, using business keys or deduplication checks on the side effect, because a retry or a cutover mistake can still repeat work. Set Temporal Activity IDs or Workflow IDs from stable business keys, and watch for duplicate effects in downstream systems during the overlap. Write the cutover order and rollback steps into the plan before starting.

What usually goes wrong in Celery to Temporal migrations

Most Celery to Temporal migrations fail in predictable places: duplicate side effects during the parallel run, retry behavior that does not match Celery, and a self-hosted service that is reachable or unauthenticated. Each risk below has a prevention step to confirm before the first production task moves.

Non-idempotent tasks run twice

During the parallel run, the same business action can be triggered by a Celery task and by a Standalone Activity. Payment captures, email sends and ledger writes are the usual casualties. Before cutover, list every task with an external side effect and give each one an idempotency key derived from its business identifier, then confirm the downstream system rejects repeats.

Temporal migration guide

Retry semantics assumed to match Celery

Celery's max_retries, countdown and autoretry_for settings do not carry over automatically. A Temporal Retry Policy sets initial interval, backoff coefficient, maximum attempts and non-retryable error types, and an activity timeout can end retries earlier than expected. Translate each task's retry settings explicitly and test a forced failure in a non-production namespace.

Workers reachable from untrusted networks

Temporal workers and the Temporal Service should not sit on hosts reachable from the public internet. Migrated workers often run in the same subnets as the old Celery pool, which may have broader access than the Temporal frontend needs. Confirm worker egress, the frontend port and the database network paths against an allowlist of trusted internal networks.

Self-hosted service left unauthenticated

If no Authorizer is configured, self-hosted Temporal uses the default noopAuthorizer, which allows every API request with no authentication or access control. Any client that can reach the frontend can start, signal or terminate workflows. Before go-live, configure mTLS, a ClaimMapper and an Authorizer, and verify that an unauthenticated client is refused.

Self-hosted security docs

Visibility gap after Flower

Flower showed Celery queues, task states and worker health in one place. Temporal's Web UI and visibility APIs answer different questions, and advanced visibility depends on a supported store such as Elasticsearch or OpenSearch for larger volumes. Before retiring Flower, define the dashboards, alerts and search queries operators rely on and confirm each one works against the chosen visibility store.

Visibility docs

Cutover without a rollback path

Switching all producers from .delay() to Temporal clients in one step leaves no way back if workers misbehave. Keep the Celery broker and workers running, route a small share of new tasks to Temporal, and define the exact condition that reverses the switch. Confirm who can change the routing and how long in-flight Celery tasks are allowed to drain.

How Celery traffic moves to Temporal during the parallel run

The diagram starts at the Python producers, which still call delay on Celery for task types that have not moved yet. Tasks for migrated types go through a Temporal Client that starts Standalone Activities on the Temporal Service, and Temporal Workers pick them up from a task queue. Both paths run inside the internal network boundary. Before cutover, check that each task type is routed to exactly one path, that the Celery queue for a migrated type drains to zero, and that Temporal visibility shows the same outcomes Flower showed before.

Traffic split by task type between Celery and Temporal during the parallel run.

How DeployOpen scopes and delivers a Celery to Temporal migration

DeployOpen approaches a Celery to Temporal Standalone Activities migration as a written, fixed-scope engagement inside infrastructure you control. We start by inventorying the Celery tasks, their retries and their callers, then build, test, document and hand over the replacement, with ongoing support available as a retainer.

How we scope

  • We inventory each Celery task, its callers, delay and get usage, and retry behavior before any build starts.
  • Scope sets which tasks become Standalone Activities and which need Workflows, agreed in writing with deliverables.
  • We record the Celery queues, workers, Flower dashboards and alerts that the migration will retire or replace.

How we build

  • We convert tasks into Activities run by Temporal Workers, replacing delay and get calls with Client-started executions.
  • We map each Celery retry setting to a Retry Policy and test the failure paths that matter to your jobs.
  • We deploy the self-hosted Temporal Service or planned Temporal Cloud setup, with visibility, access control and worker deployment configured in your environment.

How we hand over

  • You receive documentation covering task mapping, Retry Policy decisions, worker deployment and visibility queries that replace Flower views.
  • We run the old Celery and new Temporal paths side by side in a cutover plan agreed with your team.
  • Handover includes runbooks for worker rollout, Temporal Server upgrades and the Web UI, so your team can operate the system.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers once the migration is live.
  • Post-cutover, we review task failures, retry behavior and visibility gaps and recommend fixes in writing.
  • Any change to Temporal Server versions or persistence follows a planned upgrade path agreed with your team.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.