Repository Analysis

rq/rq

Simple job queues for Python

21.1 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of rq/rq, a Python project with 10,665 GitHub stars. SynthScan v2.0 examined 33,374 lines of code across 139 source files, recording 623 pattern matches distributed across 14 syntactic categories. The overall adjusted score of 21.1 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).

21.1
Adjusted Score
21.1
Raw Score
100%
Time Factor
2026-07-12
Last Push
10.7K
Stars
Python
Language
33.4K
Lines of Code
139
Files
623
Pattern Hits
2026-07-14
Scan Date
0.17
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 0HIGH 24MEDIUM 6LOW 593

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 623 distinct pattern matches across 14 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 Identifiers463 hits · 442 pts
SeverityFileLineSnippetContext
LOWtests/test_job.py116 def test_create_job_from_string_function(self):CODE
LOWtests/test_job.py125 def test_create_job_from_callable_class(self):CODE
LOWtests/test_job.py133 def test_job_properties_set_data_property(self):CODE
LOWtests/test_job.py522 def test_job_status_always_exists(self):CODE
LOWtests/test_job.py529 def test_get_status_fails_when_job_deleted_from_redis(self):CODE
LOWtests/test_job.py538 def test_job_access_outside_job_fails(self):CODE
LOWtests/test_job.py542 def test_job_access_within_job_function(self):CODE
LOWtests/test_job.py551 def test_job_access_within_synchronous_job_function(self):CODE
LOWtests/test_job.py555 def test_job_async_status_finished(self):CODE
LOWtests/test_job.py561 def test_enqueue_job_async_status_finished(self):CODE
LOWtests/test_job.py781 def test_get_call_string_unicode(self):CODE
LOWtests/test_job.py789 def test_create_job_from_static_method(self):CODE
LOWtests/test_job.py797 def test_create_job_with_ttl_should_have_ttl_after_enqueued(self):CODE
LOWtests/test_job.py804 def test_create_job_with_ttl_should_expire(self):CODE
LOWtests/test_job.py811 def test_create_and_cancel_job(self):CODE
LOWtests/test_job.py848 def test_create_and_cancel_job_with_serializer(self):CODE
LOWtests/test_job.py856 def test_key_for_should_return_prefixed_job_id(self):CODE
LOWtests/test_job.py864 def test_blocking_result_fetch(self):CODE
LOWtests/test_job.py95 def test_create_instance_method_job(self):CODE
LOWtests/test_job.py105 def test_create_job_with_serializer(self):CODE
LOWtests/test_job.py144 def test_data_property_sets_job_properties(self):CODE
LOWtests/test_job.py221 def test_persistence_of_empty_jobs(self): # noqaCODE
LOWtests/test_job.py227 def test_persistence_of_typical_jobs(self):CODE
LOWtests/test_job.py261 def test_persistence_of_parent_job(self):CODE
LOWtests/test_job.py292 def test_persistence_of_callbacks(self):CODE
LOWtests/test_job.py345 def test_fetching_unreadable_data(self):CODE
LOWtests/test_job.py376 def test_compressed_exc_info_handling(self):CODE
LOWtests/test_job.py397 def test_compressed_job_data_handling(self):CODE
LOWtests/test_job.py411 def test_custom_meta_is_persisted(self):CODE
LOWtests/test_job.py439 def test_custom_meta_is_rewriten_by_save_meta(self):CODE
LOWtests/test_job.py470 def test_result_ttl_is_persisted(self):CODE
LOWtests/test_job.py482 def test_failure_ttl_is_persisted(self):CODE
LOWtests/test_job.py494 def test_description_is_persisted(self):CODE
LOWtests/test_job.py509 def test_prepare_for_execution(self):CODE
LOWtests/test_job.py622 def test_job_delete_removes_itself_from_registries(self):CODE
LOWtests/test_job.py715 def test_job_delete_execution_registry(self):CODE
LOWtests/test_job.py738 def test_create_job_with_invalid_id(self):CODE
LOWtests/test_job.py766 def test_create_job_with_async(self):CODE
LOWtests/test_job.py826 def test_create_and_cancel_job_fails_already_canceled(self):CODE
LOWtests/test_job.py880 def test_should_enqueue_at_front(self):CODE
LOWtests/test_retry.py22 def test_persistence_of_retry_data(self):CODE
LOWtests/test_retry.py137 def test_job_create_with_retry(self):CODE
LOWtests/test_retry.py172 def test_cleanup_handles_retries(self):CODE
LOWtests/test_retry.py263 def test_handle_job_retry_max_retries_exceeded(self):CODE
LOWtests/test_retry.py325 def test_job_handle_retry_with_interval_increments_number_of_retries(self):CODE
LOWtests/test_retry.py336 def test_worker_handles_max_retry(self):CODE
LOWtests/test_retry.py363 def test_worker_handles_retry_interval(self):CODE
LOWtests/test_retry.py396 def test_worker_handles_max_retry_with_interval(self):CODE
LOWtests/test_retry.py414 def test_worker_handles_enqueue_at_front_on_retry(self):CODE
LOWtests/test_retry.py428 def test_worker_handles_enqueue_at_front_on_retry_with_interval(self):CODE
LOWtests/test_registry.py126 def test_add_and_remove_with_serializer(self):CODE
LOWtests/test_registry.py202 def test_clean_registries_with_serializer(self):CODE
LOWtests/test_registry.py255 def test_jobs_are_put_in_registry(self):CODE
LOWtests/test_registry.py292 def test_add_with_deferred_ttl(self):CODE
LOWtests/test_registry.py360 def test_delete_removes_ready_job_from_registry(self):CODE
LOWtests/test_registry.py371 def test_job_is_ready_to_enqueue(self):CODE
LOWtests/test_registry.py379 def test_enqueue_jobs_moves_ready_jobs_to_queue(self):CODE
LOWtests/test_registry.py406 def test_enqueue_jobs_drops_stale_entries(self):CODE
LOWtests/test_registry.py429 def test_enqueue_jobs_isolates_failures(self):CODE
LOWtests/test_registry.py454 def test_cleanup_recovers_ready_jobs(self):CODE
403 more matches not shown…
Docstring Block Structure19 hits · 95 pts
SeverityFileLineSnippetContext
HIGHrq/queue.py154Returns a Queue instance, based on the naming conventions for naming the internal Redis keys. Can be used to reSTRING
HIGHrq/queue.py573Creates a job based on parameters given Args: func (FunctionReferenceType): The function reference:STRING
HIGHrq/queue.py1217Enqueues a job for delayed execution checking dependencies. Args: job (Job): The job to enqueue STRING
HIGHrq/queue.py1625Helper method to abstract away from some Redis API details where LPOP accepts only a single key, whereas BLPOP STRING
HIGHrq/queue.py1701Class method returning the job_class instance at the front of the given set of Queues, where the order of the quSTRING
HIGHrq/registry.py197Requeues the job with the given job ID. Args: job_or_id (Union['Job', str]): The Job or theSTRING
HIGHrq/registry.py686Returns datetime (UTC) at which job is scheduled to be enqueued Args: job_or_id (Union[Job, str]): STRING
HIGHrq/job.py271Creates a new Job instance for the given function, arguments, and keyword arguments. Args: STRING
HIGHrq/job.py416Gets the Job Status Args: refresh (bool, optional): Whether to refresh the Job. Defaults to True. STRING
HIGHrq/job.py1204Cancels the given job, which will prevent the job from ever being ran (or inspected). This method merelSTRING
HIGHrq/utils.py80Resolve a function reference into instance and function name components. Args: func: The function referenceSTRING
HIGHrq/utils.py119Converts a bytes value to a string using `utf-8`. Args: v (Union[bytes, str]): The value (bytes or string) STRING
HIGHrq/utils.py167Returns an attribute from a dotted path name. Example: `path.to.func`. When the attribute we look for is a staticmeSTRING
HIGHrq/utils.py265Normalize configuration path to dotted module path format. Converts file paths like 'directory/config_file.py' or 'STRING
HIGHrq/utils.py308Validate that an absolute file path exists and points to a file. Args: file_path: The absolute file path toSTRING
HIGHrq/scripts.py59Atomically check uniqueness, save job, and optionally push to queue using Lua script. Args: connection: RedSTRING
HIGHrq/scripts.py165Atomically check uniqueness, save job, and add to scheduled registry using Lua script. Args: connection: ReSTRING
HIGHrq/worker_registration.py58Returns a list of worker keys for a given queue. Args: queue (Optional['Queue'], optional): The QueSTRING
HIGHrq/worker/base.py282Returns a Worker instance, based on the naming conventions for naming the internal Redis keys. Can be used to rSTRING
Unused Imports61 hits · 61 pts
SeverityFileLineSnippetContext
LOWtests/fixtures.py6CODE
LOWrq/queue.py1CODE
LOWrq/executions.py1CODE
LOWrq/worker_pool.py1CODE
LOWrq/command.py7CODE
LOWrq/command.py9CODE
LOWrq/results.py1CODE
LOWrq/webhook.py1CODE
LOWrq/maintenance.py8CODE
LOWrq/registry.py1CODE
LOWrq/cron.py1CODE
LOWrq/job.py1CODE
LOWrq/serializers.py1CODE
LOWrq/cron_scheduler_registry.py1CODE
LOWrq/__init__.py2CODE
LOWrq/__init__.py2CODE
LOWrq/__init__.py2CODE
LOWrq/__init__.py2CODE
LOWrq/__init__.py2CODE
LOWrq/__init__.py3CODE
LOWrq/__init__.py4CODE
LOWrq/__init__.py5CODE
LOWrq/__init__.py7CODE
LOWrq/__init__.py8CODE
LOWrq/__init__.py8CODE
LOWrq/__init__.py8CODE
LOWrq/suspension.py1CODE
LOWrq/types.py1CODE
LOWrq/types.py10CODE
LOWrq/types.py12CODE
LOWrq/types.py12CODE
LOWrq/logutils.py1CODE
LOWrq/intermediate_queue.py1CODE
LOWrq/repeat.py1CODE
LOWrq/utils.py8CODE
LOWrq/rate_limit.py1CODE
LOWrq/group.py1CODE
LOWrq/scheduler.py1CODE
LOWrq/worker_registration.py1CODE
LOWrq/job_lifecycle.py1CODE
LOWrq/decorators.py1CODE
LOWrq/cli/__init__.py2CODE
LOWrq/cli/__init__.py6CODE
LOWrq/cli/__init__.py7CODE
LOWrq/cli/__init__.py8CODE
LOWrq/worker/__init__.py1CODE
LOWrq/worker/__init__.py2CODE
LOWrq/worker/__init__.py2CODE
LOWrq/worker/__init__.py2CODE
LOWrq/worker/__init__.py2CODE
LOWrq/worker/__init__.py2CODE
LOWrq/worker/__init__.py2CODE
LOWrq/worker/__init__.py10CODE
LOWrq/worker/__init__.py11CODE
LOWrq/worker/__init__.py11CODE
LOWrq/worker/__init__.py11CODE
LOWrq/worker/__init__.py11CODE
LOWrq/worker/__init__.py11CODE
LOWrq/worker/__init__.py11CODE
LOWrq/worker/worker_classes.py1CODE
1 more matches not shown…
Excessive Try-Catch Wrapping21 hits · 22 pts
SeverityFileLineSnippetContext
LOWtests/test_worker.py1827 except Exception:CODE
LOWrq/queue.py1585 except Exception:CODE
LOWrq/queue.py1749 except Exception as e:CODE
LOWrq/webhook.py99 except Exception:CODE
LOWrq/registry.py298 except Exception:CODE
LOWrq/registry.py623 except Exception:CODE
LOWrq/cron.py424 except Exception as e:CODE
LOWrq/cron.py446 except Exception as e:CODE
LOWrq/cron.py460 except Exception as e:CODE
LOWrq/job.py606 except Exception as e:CODE
LOWrq/job.py996 except Exception:CODE
LOWrq/job.py1028 except Exception:CODE
LOWrq/job.py1041 except Exception: # depends on the serializerCODE
LOWrq/job.py1294 except Exception:CODE
LOWrq/job.py1634 except Exception: # noqaCODE
LOWrq/job.py1647 except Exception: # noqaCODE
LOWrq/cli/workers.py169 except Exception as e:CODE
LOWrq/cli/helpers.py259 except Exception:CODE
LOWrq/worker/worker_classes.py159 except Exception:CODE
LOWrq/worker/base.py795 except Exception as e:CODE
LOWrq/worker/base.py1445 except Exception as e:CODE
Deep Nesting17 hits · 16 pts
SeverityFileLineSnippetContext
LOWrq/queue.py660CODE
LOWrq/registry.py563CODE
LOWrq/cron.py148CODE
LOWrq/job.py1198CODE
LOWrq/job.py1333CODE
LOWrq/job.py1941CODE
LOWrq/repeat.py29CODE
LOWrq/utils.py79CODE
LOWrq/dependency.py11CODE
LOWrq/scheduler.py219CODE
LOWrq/cli/helpers.py267CODE
LOWrq/worker/base.py594CODE
LOWrq/worker/base.py719CODE
LOWrq/worker/base.py832CODE
LOWrq/worker/base.py1134CODE
LOWrq/worker/base.py1388CODE
LOWrq/worker/base.py1476CODE
Cross-File Repetition3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHrq/worker_pool.py0installs signal handlers for handling sigint and sigterm gracefully.STRING
HIGHrq/scheduler.py0installs signal handlers for handling sigint and sigterm gracefully.STRING
HIGHrq/worker/base.py0installs signal handlers for handling sigint and sigterm gracefully.STRING
Self-Referential Comments6 hits · 14 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_repeat.py68 # Create a job with repeat settingsCOMMENT
MEDIUMtests/test_results.py66 # Create a result without any execution info (simulates pre-upgrade data).COMMENT
MEDIUMtests/test_cron.py255 # Create a Cron instance firstCOMMENT
MEDIUM.github/workflows/valkey.yml27 # Define the service container for ValkeyCOMMENT
MEDIUMrq/registry.py247 """This method is automatically called by `count()` and `get_job_ids()` methodsSTRING
MEDIUMrq/worker/base.py1120 """This method is called by the main `Worker` (not the horse) as it prepares for execution.STRING
AI Structural Patterns14 hits · 14 pts
SeverityFileLineSnippetContext
LOWrq/queue.py549CODE
LOWrq/queue.py719CODE
LOWrq/queue.py805CODE
LOWrq/worker_pool.py256CODE
LOWrq/results.py29CODE
LOWrq/results.py278CODE
LOWrq/cron.py609CODE
LOWrq/cron.py44CODE
LOWrq/cron.py264CODE
LOWrq/job.py246CODE
LOWrq/decorators.py21CODE
LOWrq/cli/helpers.py334CODE
LOWrq/worker/base.py133CODE
LOWrq/worker/base.py594CODE
Modern Structural Boilerplate6 hits · 6 pts
SeverityFileLineSnippetContext
LOWrq/cron.py140 def set_enqueue_time(self, time: datetime) -> None:CODE
LOWrq/job.py434 def set_status(self, status: JobStatus, pipeline: Pipeline | None = None) -> None:CODE
LOWrq/__init__.py10__all__ = [CODE
LOWrq/utils.py45logger = logging.getLogger(__name__)CODE
LOWrq/worker/__init__.py20__all__ = [CODE
LOWrq/worker/base.py250 def _set_ip_address(self, connection: Redis) -> None:CODE
Cross-Language Confusion2 hits · 5 pts
SeverityFileLineSnippetContext
HIGHrq/local.py87 >>> ls.push(42)STRING
HIGHrq/local.py90 >>> ls.push(23)STRING
AI Slop Vocabulary3 hits · 4 pts
SeverityFileLineSnippetContext
LOWtests/test_cli.py971 # Make the start method just return to avoid infinite loopCOMMENT
LOWrq/local.py12# Since each thread has its own greenlet we can just use those as identifiersCOMMENT
LOWrq/timeouts.py50 # just pass through, BaseTimeoutException being handled normally to theCOMMENT
Redundant / Tautological Comments3 hits · 4 pts
SeverityFileLineSnippetContext
LOWrq/repeat.py104 # Decrement repeats_leftCOMMENT
LOWrq/utils.py283 # Check if it's already a dotted path (no path separators and no .py extension)COMMENT
LOWrq/worker/base.py1413 # Check if job has exceeded max retriesCOMMENT
Over-Commented Block3 hits · 3 pts
SeverityFileLineSnippetContext
LOWtests/test_scheduler.py81 job = Job.create('myfunc', connection=self.connection)COMMENT
LOW.github/workflows/codeql.yaml21 - name: Initialize CodeQLCOMMENT
LOWrq/worker_pool.py121 self.handle_dead_worker(data)COMMENT
Fake / Example Data2 hits · 3 pts
SeverityFileLineSnippetContext
LOWtests/test_queue.py612 pipe.watch(b'fake_key') # Test watch then enqueueCODE
LOWtests/test_queue.py619 pipe.set(b'fake_key', b'fake_value')CODE