Repository Analysis

celery/celery

Distributed Task Queue (development branch)

23.3 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of celery/celery, a Python project with 28,681 GitHub stars. SynthScan v2.0 examined 108,638 lines of code across 524 source files, recording 2377 pattern matches distributed across 21 syntactic categories. The overall adjusted score of 23.3 places this repository in the Moderate AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

23.3
Adjusted Score
23.3
Raw Score
100%
Time Factor
2026-07-13
Last Push
28.7K
Stars
Python
Language
108.6K
Lines of Code
524
Files
2.4K
Pattern Hits
2026-07-14
Scan Date
0.06
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 16HIGH 16MEDIUM 58LOW 2287

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 2377 distinct pattern matches across 21 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers1797 hits · 1580 pts
SeverityFileLineSnippetContext
LOWdocs/conf.py90def configcheck_project_settings():CODE
LOWdocs/conf.py103def configcheck_should_ignore(setting):CODE
LOWdocs/_ext/celerydocs.py127def maybe_resolve_abbreviations(app, env, node, contnode):CODE
LOWt/smoke/signals.py12def worker_process_init_handler(sender, **kwargs):CODE
LOWt/smoke/signals.py17def worker_process_shutdown_handler(sender, pid, exitcode, **kwargs):CODE
LOWt/smoke/tasks.py42def soft_time_limit_lower_than_time_limit():CODE
LOWt/smoke/tasks.py47def soft_time_limit_must_exceed_time_limit():CODE
LOWt/smoke/tasks.py65def self_termination_system_exit():CODE
LOWt/smoke/tasks.py71def countdown_task_with_retry(self):CODE
LOWt/smoke/tasks.py79def non_eta_task_with_retries(self):CODE
LOWt/smoke/tasks.py93def self_termination_delay_timeout():CODE
LOWt/smoke/tasks.py99def self_termination_exhaust_memory():CODE
LOWt/smoke/tests/test_signals.py42 def before_task_publish_handler(*args, **kwargs):CODE
LOWt/smoke/tests/test_signals.py54 def after_task_publish_handler(*args, **kwargs):CODE
LOWt/smoke/tests/test_control.py14 def test_shutdown_exit_with_zero(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/test_canvas.py38 def test_chain_gets_last_task_id_with_failing_tasks_in_chain(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/test_canvas.py56 def test_upgrade_to_chord_inside_chains(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/test_canvas.py144 def test_chord_error_propagation_with_different_body_types(CODE
LOWt/smoke/tests/test_canvas.py185 def test_pending_tasks_released_on_forget(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/test_worker.py37 def test_restart_during_task_execution(CODE
LOWt/smoke/tests/test_worker.py48 def test_restart_between_task_execution(CODE
LOWt/smoke/tests/test_worker.py86 def test_multiple_warm_shutdown_does_nothing(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/test_worker.py115 def test_hard_shutdown_from_warm(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/test_worker.py131 def test_hard_shutdown_from_cold(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/test_worker.py162 def test_shutdown_with_long_running_tasks(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/test_worker.py199 def test_hard_shutdown_from_cold(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/test_worker.py238 def test_hard_shutdown_from_soft(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/test_worker.py253 def test_task_completes_during_soft_shutdown(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/test_worker.py282 def test_task_completes_during_soft_shutdown_with_time_limit(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/test_worker.py338 def test_hard_shutdown_from_soft(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/test_worker.py370 def test_soft_shutdown_reset_visibility_timeout(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/test_worker.py391 def test_soft_shutdown_reset_visibility_timeout_group_one_finish(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/test_worker.py416 def test_soft_shutdown_reset_visibility_timeout_group_none_finish(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/test_worker.py450 def test_soft_shutdown_reset_visibility_timeout(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/test_worker.py471 def test_soft_shutdown_reset_visibility_timeout_group_one_finish(CODE
LOWt/smoke/tests/test_tasks.py33 def test_child_process_respawn(CODE
LOWt/smoke/tests/test_tasks.py53 def wait_for_two_celery_processes():CODE
LOWt/smoke/tests/test_tasks.py98 def test_terminated_task_logs_correct_error(CODE
LOWt/smoke/tests/test_tasks.py137 def test_soft_time_limit_lower_than_time_limit(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/test_tasks.py143 def test_soft_time_limit_must_exceed_time_limit(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/test_consumer.py40 def test_reducing_prefetch_count(self, celery_setup: CeleryTestSetup, expected_running_tasks_count: int):CODE
LOWt/smoke/tests/test_consumer.py63 def test_prefetch_count_restored(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/test_consumer.py86 def test_max_prefetch_passed_on_broker_restart(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/test_consumer.py107 def test_max_prefetch_not_passed_on_broker_restart(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/test_consumer.py121 def test_worker_consume_tasks_after_redis_broker_restart(CODE
LOWt/smoke/tests/test_consumer.py149 def test_worker_does_not_hang_on_broker_connection_loss(CODE
LOWt/smoke/tests/test_dedup_chain_dispatch.py33 def test_reject_requeue_completes_chain(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/test_dedup_chain_dispatch.py42 def test_dedup_dispatches_chain_on_redelivery(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/test_dedup_chain_dispatch.py51 def test_dedup_dispatches_callback_on_redelivery(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/test_thread_safe.py50 def test_multithread_task_publish(CODE
LOWt/smoke/tests/test_thread_safe.py58 def after_task_publish_handler(*args, **kwargs):CODE
LOWt/smoke/tests/stamping/test_revoke.py47 def test_revoke_by_stamped_headers_after_publish(CODE
LOWt/smoke/tests/stamping/test_revoke.py63 def test_revoke_by_stamped_headers_before_publish(CODE
LOWt/smoke/tests/stamping/conftest.py10def default_rabbitmq_broker_image() -> str:CODE
LOWt/smoke/tests/stamping/test_hybrid_cluster.py12def get_hybrid_clusters_matrix() -> list[list[str]]:CODE
LOWt/smoke/tests/stamping/test_hybrid_cluster.py83 def test_multiple_stamps_multiple_workers(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/stamping/test_hybrid_cluster.py109 def test_stamping_on_replace_with_legacy_worker_in_cluster(CODE
LOWt/smoke/tests/quorum_queues/test_cycle_detection.py16 def test_countdown_task_with_retry(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/quorum_queues/test_cycle_detection.py22 def test_non_eta_task_with_multiple_retries(self, celery_setup: CeleryTestSetup):CODE
LOWt/smoke/tests/quorum_queues/conftest.py34def default_rabbitmq_broker_image() -> str:CODE
1737 more matches not shown…
Hallucination Indicators16 hits · 210 pts
SeverityFileLineSnippetContext
CRITICALt/unit/tasks/test_canvas.py269 x.type.app.control.election.assert_called()CODE
CRITICALt/unit/app/test_app.py1655 self.app.amqp.queues.select.assert_called_with({'foo', 'bar'})CODE
CRITICALt/unit/backends/test_redis.py217 consumer.backend.client.connection_pool.reset.assert_called_once()CODE
CRITICALt/unit/backends/test_redis.py223 consumer.backend.client.connection_pool.reset.reset_mock()CODE
CRITICALt/unit/backends/test_redis.py226 consumer.backend.client.connection_pool.reset.assert_called_once()CODE
CRITICALt/unit/backends/test_redis.py232 consumer.backend.client.connection_pool.reset.reset_mock()CODE
CRITICALt/unit/backends/test_redis.py1561 self.b.client.pipeline.return_value.zadd().zcount().get().get().expire(CODE
CRITICALt/unit/backends/test_redis.py1573 self.b.client.pipeline.return_value.zadd().zcount().get().get().expire(CODE
CRITICALt/unit/backends/test_redis.py1589 self.b.client.pipeline.return_value.rpush().llen().get().get().expire(CODE
CRITICALt/unit/backends/test_redis.py1605 self.b.client.pipeline.return_value.zadd().zcount().get().get().expire(CODE
CRITICALt/unit/backends/test_redis.py1529 self.b.client.pipeline.return_value.zadd().zcount().get().get().expire(CODE
CRITICALt/unit/backends/test_redis.py1545 self.b.client.pipeline.return_value.rpush().llen().get().get().expire(CODE
CRITICALt/unit/worker/test_strategy.py283 C.consumer.controller.state.revoked.add(task.id)CODE
CRITICALt/unit/worker/test_worker.py744 self.app.amqp.queues.select_add.assert_called_with(CODE
CRITICALt/integration/test_canvas.py1966 root_id, parent_id, value = res.parent.parent.parent.parent.get(CODE
CRITICALcelery/backends/azureblockblob.py13 from azure.core.exceptions import ResourceExistsError, ResourceNotFoundErrorCODE
Excessive Try-Catch Wrapping154 hits · 170 pts
SeverityFileLineSnippetContext
MEDIUMdocs/changelog_formatter.py22 print(f"Error: {filename} file not found.")CODE
LOWt/smoke/tests/test_tasks.py107 except Exception as err:CODE
LOW…smoke/tests/quorum_queues/test_chord_unlock_routing.py62 except Exception as exc:CODE
LOWt/unit/tasks/test_tasks.py112 except Exception as exc:CODE
LOWt/unit/tasks/test_tasks.py125 except Exception as exc:CODE
LOWt/unit/tasks/test_tasks.py186 except Exception as exc:CODE
LOWt/unit/app/test_schedules.py672 except Exception as exc:CODE
LOWt/unit/app/test_log.py102 except Exception:CODE
LOWt/unit/app/test_trace.py32 except Exception as e:CODE
LOWt/unit/app/test_trace.py92 except Exception:CODE
LOWt/unit/app/test_trace.py109 except Exception:CODE
LOWt/unit/app/test_trace.py132 except Exception as exc:CODE
LOWt/unit/bin/test_control.py153 except Exception as exc:CODE
LOWt/unit/backends/test_database.py391 except Exception as exc:CODE
LOWt/unit/backends/test_elasticsearch.py904 except Exception as exc:CODE
LOWt/unit/backends/test_elasticsearch.py857 except Exception as exc:CODE
LOWt/unit/backends/test_base.py1607 except Exception as exc:CODE
LOWt/unit/backends/test_base.py1670 except Exception as exc:CODE
LOWt/unit/backends/test_base.py1701 except Exception as exc:CODE
MEDIUMt/unit/backends/test_asynchronous.py577def teardown_thread(self, thread):CODE
LOWt/unit/backends/test_asynchronous.py582 except Exception:CODE
LOWt/unit/utils/test_sysinfo.py10except Exception:CODE
LOWt/unit/utils/test_collections.py142 except Exception:CODE
MEDIUMt/unit/utils/test_collections.py138def test_exception_info(self):CODE
MEDIUMt/unit/worker/test_request.py104def test_retry_semipredicate(self):CODE
MEDIUMt/unit/worker/test_request.py416def test_on_failure_WorkerLostError_rejects_with_requeue(self):CODE
MEDIUMt/unit/worker/test_request.py925def get_ei():CODE
LOWt/unit/worker/test_request.py912 except Exception:CODE
LOWt/unit/worker/test_request.py1482 except Exception as exc:CODE
LOWt/unit/worker/test_request.py107 except Exception as exc:CODE
LOWt/unit/worker/test_request.py1505 except Exception as exc:CODE
LOWt/integration/conftest.py111 except Exception as e:CODE
MEDIUMt/integration/test_canvas.py348def test_chain_error_handler_with_eta(self, manager):CODE
LOWt/integration/test_canvas.py3318 except Exception as exc:CODE
LOWt/integration/test_canvas.py3834 except Exception:CODE
LOWt/integration/test_mem_leak_in_exception_handling.py113 except Exception:CODE
LOWt/integration/test_mem_leak_in_exception_handling.py125 except Exception:CODE
LOWt/integration/test_mem_leak_in_exception_handling.py136 except Exception:CODE
LOWt/integration/test_mem_leak_in_exception_handling.py189 except Exception:CODE
LOWt/integration/test_mem_leak_in_exception_handling.py230 except Exception:CODE
LOWt/integration/test_tasks.py490 except Exception as exc:CODE
LOWt/integration/test_tasks.py769 except Exception:CODE
LOWt/integration/test_tasks.py791 except Exception:CODE
LOWt/integration/test_tasks.py816 except Exception:CODE
LOWcelery/bootsteps.py149 except Exception as exc: # pylint: disable=broad-exceptCODE
LOWcelery/platforms.py490 except Exception: # pylint: disable=broad-exceptCODE
LOWcelery/local.py326 except Exception:CODE
MEDIUMcelery/local.py69def __name__(self):CODE
LOWcelery/beat.py283 except Exception as exc: # pylint: disable=broad-exceptCODE
LOWcelery/beat.py411 except Exception as exc: # pylint: disable=broad-exceptCODE
LOWcelery/beat.py540 except Exception as exc: # pylint: disable=broad-exceptCODE
MEDIUMcelery/beat.py427def _do_sync(self):CODE
LOWcelery/app/trace.py549 except Exception as exc:CODE
LOWcelery/app/trace.py604 except Exception as exc:CODE
LOWcelery/app/trace.py670 except Exception as exc:CODE
LOWcelery/app/trace.py677 except Exception as exc:CODE
LOWcelery/app/trace.py698 except Exception as exc:CODE
LOWcelery/app/task.py863 except Exception as exc:CODE
LOWcelery/app/builtins.py67 except Exception as exc:CODE
LOWcelery/app/builtins.py82 except Exception as exc: # pylint: disable=broad-exceptCODE
94 more matches not shown…
Unused Imports158 hits · 158 pts
SeverityFileLineSnippetContext
LOWt/smoke/conftest.py1CODE
LOWt/smoke/conftest.py14CODE
LOWt/smoke/conftest.py15CODE
LOWt/smoke/conftest.py16CODE
LOWt/smoke/conftest.py17CODE
LOWt/smoke/tasks.py3CODE
LOWt/smoke/tasks.py13CODE
LOWt/smoke/tests/test_tasks.py1CODE
LOWt/smoke/tests/test_dedup_chain_dispatch.py10CODE
LOWt/smoke/tests/test_thread_safe.py1CODE
LOWt/smoke/tests/stamping/test_revoke.py1CODE
LOWt/smoke/tests/stamping/conftest.py4CODE
LOWt/smoke/tests/stamping/test_hybrid_cluster.py1CODE
LOWt/smoke/tests/stamping/test_visitor.py1CODE
LOWt/smoke/tests/quorum_queues/test_cycle_detection.py6CODE
LOWt/smoke/tests/quorum_queues/conftest.py1CODE
LOW…smoke/tests/quorum_queues/test_chord_unlock_routing.py8CODE
LOW…/quorum_queues/test_native_delayed_delivery_binding.py8CODE
LOWt/smoke/tests/quorum_queues/test_qos.py8CODE
LOWt/smoke/tests/quorum_queues/test_default_queue_type.py6CODE
LOWt/smoke/tests/failover/test_worker_failover.py1CODE
LOWt/smoke/operations/worker_kill.py1CODE
LOWt/smoke/operations/task_termination.py1CODE
LOWt/smoke/operations/worker_restart.py1CODE
LOWt/smoke/workers/other.py1CODE
LOWt/smoke/workers/alt.py1CODE
LOWt/unit/conftest.py23CODE
LOWt/unit/conftest.py23CODE
LOWt/unit/conftest.py23CODE
LOWt/unit/bin/test_daemonization.py1CODE
LOWt/unit/bin/proj/app2.py1CODE
LOWt/unit/contrib/test_sphinx.py6CODE
LOWt/unit/contrib/test_worker.py7CODE
LOWt/unit/contrib/proj/foo.py1CODE
LOWt/integration/conftest.py9CODE
LOWt/integration/conftest.py9CODE
LOWexamples/celery_http_gateway/urls.py2CODE
LOWexamples/celery_http_gateway/urls.py2CODE
LOWexamples/celery_http_gateway/urls.py2CODE
LOWexamples/stamping/myapp.py34CODE
LOWexamples/django/proj/__init__.py3CODE
LOWexamples/django/proj/urls.py1CODE
LOWexamples/django/proj/urls.py1CODE
LOWexamples/django/proj/urls.py2CODE
LOWexamples/django/proj/urls.py2CODE
LOWcelery/__init__.py75CODE
LOWcelery/__init__.py75CODE
LOWcelery/__init__.py76CODE
LOWcelery/__init__.py77CODE
LOWcelery/__init__.py78CODE
LOWcelery/__init__.py79CODE
LOWcelery/__init__.py80CODE
LOWcelery/__init__.py80CODE
LOWcelery/__init__.py80CODE
LOWcelery/__init__.py80CODE
LOWcelery/__init__.py80CODE
LOWcelery/__init__.py80CODE
LOWcelery/__init__.py80CODE
LOWcelery/__init__.py80CODE
LOWcelery/__init__.py80CODE
98 more matches not shown…
Deep Nesting95 hits · 90 pts
SeverityFileLineSnippetContext
LOWsetup.py64CODE
LOWt/unit/conftest.py314CODE
LOWt/unit/conftest.py525CODE
LOWt/unit/tasks/test_chord.py134CODE
LOWt/unit/app/test_schedules.py668CODE
LOWt/unit/backends/test_couchdb.py129CODE
LOWt/unit/contrib/test_rdb.py33CODE
LOWt/unit/fixups/test_django.py198CODE
LOWt/unit/worker/test_native_delayed_delivery.py179CODE
LOWt/unit/worker/test_consumer.py690CODE
LOWt/integration/test_canvas.py83CODE
LOWt/integration/test_tasks.py308CODE
LOWexamples/quorum-queues/myapp.py71CODE
LOWcelery/bootsteps.py137CODE
LOWcelery/platforms.py106CODE
LOWcelery/local.py320CODE
LOWcelery/__init__.py88CODE
LOWcelery/beat.py569CODE
LOWcelery/beat.py633CODE
LOWcelery/canvas.py74CODE
LOWcelery/canvas.py960CODE
LOWcelery/canvas.py1120CODE
LOWcelery/canvas.py2191CODE
LOWcelery/schedules.py434CODE
LOWcelery/app/trace.py137CODE
LOWcelery/app/trace.py344CODE
LOWcelery/app/trace.py426CODE
LOWcelery/app/trace.py475CODE
LOWcelery/app/task.py536CODE
LOWcelery/app/control.py512CODE
LOWcelery/app/utils.py327CODE
LOWcelery/app/utils.py378CODE
LOWcelery/app/utils.py329CODE
LOWcelery/app/defaults.py428CODE
LOWcelery/app/base.py846CODE
LOWcelery/bin/control.py26CODE
LOWcelery/bin/shell.py120CODE
LOWcelery/bin/logtool.py78CODE
LOWcelery/backends/gcs.py247CODE
LOWcelery/backends/filesystem.py98CODE
LOWcelery/backends/redis.py149CODE
LOWcelery/backends/redis.py593CODE
LOWcelery/backends/base.py188CODE
LOWcelery/backends/base.py254CODE
LOWcelery/backends/base.py360CODE
LOWcelery/backends/base.py457CODE
LOWcelery/backends/base.py581CODE
LOWcelery/backends/base.py635CODE
LOWcelery/backends/base.py1188CODE
LOWcelery/backends/database/session.py80CODE
LOWcelery/utils/log.py45CODE
LOWcelery/utils/log.py145CODE
LOWcelery/utils/saferepr.py158CODE
LOWcelery/utils/saferepr.py197CODE
LOWcelery/utils/imports.py48CODE
LOWcelery/utils/imports.py69CODE
LOWcelery/utils/timer2.py79CODE
LOWcelery/utils/threads.py62CODE
LOWcelery/utils/functional.py215CODE
LOWcelery/utils/functional.py318CODE
35 more matches not shown…
Self-Referential Comments22 hits · 66 pts
SeverityFileLineSnippetContext
MEDIUMt/smoke/tests/test_canvas.py160 # Create the failing group header (same for all tests)COMMENT
MEDIUMt/smoke/tests/test_canvas.py169 # Create the chordCOMMENT
MEDIUMt/unit/tasks/test_canvas.py2005 # Create a chord with header group and body chainCOMMENT
MEDIUMt/unit/tasks/test_canvas.py2026 # Create a chord with header group and body chain (no task_id set)COMMENT
MEDIUMt/unit/tasks/test_tasks.py1712 # Create a mock parent task with no root_idCOMMENT
MEDIUMt/unit/app/test_trace.py21 # Create a nested call stack to have frames to clearCOMMENT
MEDIUMt/unit/bin/proj/pyramid_celery_app.py7# This module defines a mocked Celery application to replicateCOMMENT
MEDIUMt/unit/backends/test_redis.py377 # Create a mock result object with _iter_metaCOMMENT
MEDIUMt/unit/backends/test_redis.py407 # Create a mock result object with _iter_metaCOMMENT
MEDIUMt/unit/backends/test_redis.py437 # Create a mock result object with _iter_metaCOMMENT
MEDIUMt/unit/backends/test_redis.py466 # Create a mock result object with _iter_metaCOMMENT
MEDIUMt/unit/backends/test_redis.py504 # Create a mock result object with _iter_metaCOMMENT
MEDIUMt/unit/backends/test_base.py872 # Create a mock that properly implements theCOMMENT
MEDIUMt/unit/concurrency/test_prefork.py580 # Create a mock generator (already started, so not gen_not_started)COMMENT
MEDIUMt/unit/worker/test_strategy.py130 # Create a proper mock for task_buckets that supports __getitem__COMMENT
MEDIUMt/unit/worker/test_native_delayed_delivery.py167 # Create a dummy float iteratorCOMMENT
MEDIUMt/unit/worker/test_native_delayed_delivery.py183 # Define a custom errback to check typesCOMMENT
MEDIUMt/unit/worker/test_native_delayed_delivery.py427 # Create a queueCOMMENT
MEDIUMt/unit/worker/test_autoscale.py244 # Create a mock consumer with autoscale and disable_prefetch enabledCOMMENT
MEDIUMt/integration/test_canvas.py3268 # Create the failing group header (same for all tests)COMMENT
MEDIUMcelery/app/trace.py483 # This function is very long because we've unrolled all the callsCOMMENT
MEDIUMcelery/concurrency/asynpool.py496 # This method is called whenever the process sentinel is readable.COMMENT
Decorative Section Separators14 hits · 63 pts
SeverityFileLineSnippetContext
MEDIUMt/unit/tasks/test_context.py88 # ------------------------------------------------------------------COMMENT
MEDIUMt/unit/tasks/test_context.py90 # ------------------------------------------------------------------COMMENT
MEDIUMt/unit/backends/test_asynchronous.py31# ---------------------------------------------------------------------------COMMENT
MEDIUMt/unit/backends/test_asynchronous.py33# ---------------------------------------------------------------------------COMMENT
MEDIUMt/unit/backends/test_asynchronous.py170# ---------------------------------------------------------------------------COMMENT
MEDIUMt/unit/backends/test_asynchronous.py172# ---------------------------------------------------------------------------COMMENT
MEDIUMt/unit/backends/test_asynchronous.py324# ---------------------------------------------------------------------------COMMENT
MEDIUMt/unit/backends/test_asynchronous.py326# ---------------------------------------------------------------------------COMMENT
MEDIUMt/unit/worker/test_consumer.py1471 # ------------------------------------------------------------------COMMENT
MEDIUMt/unit/worker/test_consumer.py1473 # ------------------------------------------------------------------COMMENT
MEDIUMt/unit/worker/test_consumer.py1493 # ------------------------------------------------------------------COMMENT
MEDIUMt/unit/worker/test_consumer.py1495 # ------------------------------------------------------------------COMMENT
MEDIUMt/unit/worker/test_consumer.py1528 # ------------------------------------------------------------------COMMENT
MEDIUMt/unit/worker/test_consumer.py1530 # ------------------------------------------------------------------COMMENT
Cross-Language Confusion12 hits · 55 pts
SeverityFileLineSnippetContext
HIGHt/unit/tasks/test_canvas.py1118 _task_stack.push(self.add)CODE
HIGHt/unit/app/test_log.py327 _task_stack.push(test_task)CODE
HIGHt/unit/app/test_app.py476 _state._task_stack.push(foo)CODE
HIGHt/unit/app/test_app.py898 _task_stack.push(a3cX1)CODE
HIGHt/unit/backends/test_rpc.py252 _task_stack.push(task)CODE
HIGHt/unit/utils/test_threads.py60 x.push(['foo'])CODE
HIGHt/unit/utils/test_threads.py71 x.push(['foo'])CODE
HIGHt/unit/utils/test_threads.py72 x.push(['bar'])CODE
HIGHcelery/app/task.py496 _task_stack.push(self)CODE
HIGHcelery/app/task.py1235 self.request_stack.push(Context(*args, **{**self.request.__dict__, **kwargs}))CODE
HIGHcelery/utils/threads.py163 >>> ls.push(42)STRING
HIGHcelery/utils/threads.py166 >>> ls.push(23)STRING
AI Structural Patterns50 hits · 48 pts
SeverityFileLineSnippetContext
LOWt/unit/app/test_control.py73CODE
LOWt/integration/tasks.py334CODE
LOWt/integration/test_canvas.py861CODE
LOWt/integration/test_canvas.py3559CODE
LOWt/integration/test_canvas.py3611CODE
LOWcelery/result.py191CODE
LOWcelery/result.py726CODE
LOWcelery/result.py742CODE
LOWcelery/result.py848CODE
LOWcelery/beat.py117CODE
LOWcelery/canvas.py323CODE
LOWcelery/canvas.py1048CODE
LOWcelery/canvas.py1120CODE
LOWcelery/canvas.py1763CODE
LOWcelery/canvas.py2153CODE
LOWcelery/app/amqp.py63CODE
LOWcelery/app/amqp.py326CODE
LOWcelery/app/amqp.py420CODE
LOWcelery/app/amqp.py506CODE
LOWcelery/app/trace.py344CODE
LOWcelery/app/task.py869CODE
LOWcelery/app/control.py82CODE
LOWcelery/app/control.py755CODE
LOWcelery/app/base.py343CODE
LOWcelery/app/base.py846CODE
LOWcelery/app/base.py1059CODE
LOWcelery/app/base.py1102CODE
LOWcelery/bin/worker.py108CODE
LOWcelery/bin/worker.py307CODE
LOWcelery/security/__init__.py44CODE
LOWcelery/utils/time.py407CODE
LOWcelery/contrib/migrate.py127CODE
LOWcelery/contrib/migrate.py337CODE
LOWcelery/contrib/migrate.py249CODE
LOWcelery/contrib/testing/manager.py48CODE
LOWcelery/contrib/testing/mocks.py11CODE
LOWcelery/concurrency/gevent.py28CODE
LOWcelery/concurrency/asynpool.py111CODE
LOWcelery/concurrency/base.py22CODE
LOWcelery/worker/worker.py351CODE
LOWcelery/worker/control.py52CODE
LOWcelery/worker/request.py90CODE
LOWcelery/worker/consumer/consumer.py191CODE
LOWcelery/events/dispatcher.py58CODE
LOWcelery/events/receiver.py36CODE
LOWcelery/events/state.py161CODE
LOWcelery/events/state.py407CODE
LOWcelery/events/state.py190CODE
LOWcelery/apps/multi.py370CODE
LOWcelery/apps/beat.py46CODE
Over-Commented Block21 hits · 21 pts
SeverityFileLineSnippetContext
LOWexamples/resultgraph/tasks.py1# Example::COMMENT
LOWexamples/django/proj/urls.py1from django.conf.urls import handler404, handler500 # noqaCOMMENT
LOW.github/workflows/codeql-analysis.yml1# For most projects, this workflow file will not need changing; you simply needCOMMENT
LOWcelery/__init__.py1"""Distributed Task Queue."""COMMENT
LOWcelery/canvas.py881 # Issue #5354 reported that the following type of canvasesCOMMENT
LOWcelery/canvas.py901 # variable above.COMMENT
LOWcelery/canvas.py1801 # end up messing up chord counts and there are all sorts ofCOMMENT
LOWcelery/app/trace.py841 BaseTask.__call__ = _patched.pop('BaseTask.__call__')COMMENT
LOWcelery/app/task.py241 max_retries = 3COMMENT
LOWcelery/app/task.py261COMMENT
LOWcelery/app/task.py281COMMENT
LOWcelery/app/task.py301COMMENT
LOWcelery/app/task.py321 #: :setting:`task_acks_on_failure_or_timeout` setting.COMMENT
LOWcelery/app/task.py341 #: Configuring this setting only applies to tasks that areCOMMENT
LOWcelery/app/task.py361 #: Tuple of expected exceptions.COMMENT
LOWcelery/backends/dynamodb.py361 #COMMENT
LOWcelery/backends/base.py221 # that the last chain element which controls completion ofCOMMENT
LOWcelery/backends/base.py501 # backend with the os as the module, the system function as theCOMMENT
LOWcelery/concurrency/asynpool.py801 self.on_inqueue_close = on_inqueue_closeCOMMENT
LOWcelery/concurrency/asynpool.py1081 self._active_writers.clear()COMMENT
LOWcelery/worker/loops.py101 # Reset the hub on error (e.g. connection loss) to clean upCOMMENT
Cross-File Repetition3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHt/smoke/workers/other.py0creates a pytest-celery worker node from the worker container.STRING
HIGHt/smoke/workers/alt.py0creates a pytest-celery worker node from the worker container.STRING
HIGHt/smoke/workers/latest.py0creates a pytest-celery worker node from the worker container.STRING
Fake / Example Data7 hits · 8 pts
SeverityFileLineSnippetContext
LOWt/unit/backends/test_elasticsearch.py729 url = 'elasticsearch+https://fake_user:fake_pass@localhost:9200/index/doc_type'CODE
LOWt/unit/backends/test_elasticsearch.py733 assert x.username == 'fake_user'CODE
LOWt/unit/backends/test_elasticsearch.py740 http_auth=('fake_user', 'fake_pass'),CODE
LOWt/unit/apps/test_multi.py183 self.node = Node('foo@bar.com', options={'-A': 'proj'})CODE
LOWt/unit/apps/test_multi.py190 'foo@bar.com',CODE
LOWt/unit/apps/test_multi.py284 'foo@bar.com',CODE
LOWt/unit/apps/test_multi.py293 'foo@bar.com',CODE
Modern Structural Boilerplate7 hits · 7 pts
SeverityFileLineSnippetContext
LOWt/integration/conftest.py19logger = logging.getLogger(__name__)CODE
LOWt/integration/test_mem_leak_in_exception_handling.py16logger = logging.getLogger(__name__)CODE
LOWcelery/backends/rpc.py21logger = logging.getLogger(__name__)CODE
LOWcelery/backends/database/__init__.py22logger = logging.getLogger(__name__)CODE
LOWcelery/utils/time.py31logger = logging.getLogger(__name__)CODE
LOWcelery/worker/consumer/delayed_delivery.py112 def _setup_delayed_delivery(self, c: Consumer, broker_url: str) -> None:CODE
LOWcelery/apps/beat.py149 def set_process_title(self) -> None:CODE
Slop Phrases4 hits · 7 pts
SeverityFileLineSnippetContext
LOWexamples/celery_http_gateway/settings.py90 # Don't forget to use absolute paths, not relative paths.COMMENT
MEDIUMcelery/app/amqp.py245 # For example, you can use ``autoexchange = lambda n: None`` to use theCOMMENT
LOWcelery/app/task.py357 #: Warning: Enabling this can cause message loops; make sure you knowCOMMENT
MEDIUMcelery/bin/multi.py71 $ # but you can also modify the options for ranges of, or specific workersSTRING
AI Slop Vocabulary4 hits · 7 pts
SeverityFileLineSnippetContext
LOWt/unit/tasks/test_canvas.py1255 # In the following tests, getting the group ID is a pain so we just useCOMMENT
LOWcelery/app/utils.py261 # no settings, just use new format.COMMENT
LOWcelery/utils/threads.py333 # since each thread has its own greenlet we can just use those asCOMMENT
LOWcelery/worker/consumer/consumer.py611 # Retry disabled, just call connect directly.COMMENT
Overly Generic Function Names4 hits · 6 pts
SeverityFileLineSnippetContext
LOWt/unit/app/test_trace.py87 def test_function():CODE
LOWt/unit/app/test_trace.py104 def test_function():CODE
LOWt/unit/app/test_trace.py127 def test_function():CODE
LOWt/unit/concurrency/test_pool.py10def do_something(i):CODE
Docstring Block Structure1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHcelery/worker/consumer/delayed_delivery.py232Validate and split broker URLs. Args: broker_urls: Broker URLs, either as a semicolon-separated strSTRING
Dead Code2 hits · 4 pts
SeverityFileLineSnippetContext
MEDIUMt/unit/utils/test_functional.py166CODE
MEDIUMt/unit/worker/test_loops.py401CODE
Redundant / Tautological Comments3 hits · 4 pts
SeverityFileLineSnippetContext
LOWt/integration/test_canvas.py3289 # Check if the message appears in the logs (it shouldn't)COMMENT
LOWexamples/django/demoapp/tasks.py48 retry_jitter=False, # Set False to disable randomization (use exact values: 5s, 10s, 20s)CODE
LOWcelery/schedules.py677 # Check if the last feasible date is within the deadlineCOMMENT
Verbosity Indicators2 hits · 3 pts
SeverityFileLineSnippetContext
LOWcelery/bin/worker.py54 # we need to check if the worker pool was configured.COMMENT
LOWcelery/worker/request.py638 # According to the comment below, we need to check if the taskCOMMENT
Structural Annotation Overuse1 hit · 2 pts
SeverityFileLineSnippetContext
LOWcelery/canvas.py929 # WARNING: Be careful not to mutate `options['chain']`.COMMENT