summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/codeql.yaml2
-rw-r--r--.github/workflows/dependencies.yml2
-rw-r--r--.github/workflows/docker.yml2
-rw-r--r--.github/workflows/lint.yml2
-rw-r--r--.github/workflows/workflow.yml2
-rw-r--r--rq/worker.py4
-rw-r--r--tests/test_worker.py1
7 files changed, 5 insertions, 10 deletions
diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml
index 4e33500..07b94a0 100644
--- a/.github/workflows/codeql.yaml
+++ b/.github/workflows/codeql.yaml
@@ -7,7 +7,7 @@ on:
jobs:
CodeQL-Build:
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
permissions:
# required for all workflows
diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml
index 5720916..42b0389 100644
--- a/.github/workflows/dependencies.yml
+++ b/.github/workflows/dependencies.yml
@@ -10,7 +10,7 @@ jobs:
build:
if: github.repository == 'rq/rq'
name: Python${{ matrix.python-version }}/Redis${{ matrix.redis-version }}/redis-py${{ matrix.redis-py-version }}
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8.3", "3.9", "3.10"]
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index b9123a1..7a9dda6 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -14,7 +14,7 @@ permissions:
jobs:
push:
if: github.repository == 'rq/rq'
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index d236d60..b8721e3 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -12,7 +12,7 @@ permissions:
jobs:
lint:
name: Lint
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml
index 7d03da1..7b0a28d 100644
--- a/.github/workflows/workflow.yml
+++ b/.github/workflows/workflow.yml
@@ -12,7 +12,7 @@ permissions:
jobs:
build:
name: Python${{ matrix.python-version }}/Redis${{ matrix.redis-version }}/redis-py${{ matrix.redis-py-version }}
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8.3", "3.9", "3.10"]
diff --git a/rq/worker.py b/rq/worker.py
index dff9be0..e44aa9f 100644
--- a/rq/worker.py
+++ b/rq/worker.py
@@ -980,7 +980,6 @@ class Worker:
job_class=self.job_class,
serializer=self.serializer
)
- job.worker_name = None
# check whether a job was stopped intentionally and set the job
# status appropriately if it was this job.
@@ -1060,8 +1059,6 @@ class Worker:
if result_ttl != 0:
self.log.debug('Setting job %s status to finished', job.id)
job.set_status(JobStatus.FINISHED, pipeline=pipeline)
- job.worker_name = None
-
# Result should be saved in job hash only if server
# doesn't support Redis streams
include_result = not self.supports_redis_streams
@@ -1071,7 +1068,6 @@ class Worker:
if self.supports_redis_streams:
Result.create(job, Result.Type.SUCCESSFUL, return_value=job._result,
ttl=result_ttl, pipeline=pipeline)
-
finished_job_registry = queue.finished_job_registry
finished_job_registry.add(job, result_ttl, pipeline)
diff --git a/tests/test_worker.py b/tests/test_worker.py
index 5d4ad34..6c7b405 100644
--- a/tests/test_worker.py
+++ b/tests/test_worker.py
@@ -379,7 +379,6 @@ class TestWorker(RQTestCase):
# Check the job
job = Job.fetch(job.id)
self.assertEqual(job.origin, q.name)
- self.assertIsNone(job.worker_name) # Worker name is cleared after failures
# Should be the original enqueued_at date, not the date of enqueueing
# to the failed queue