prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Add an endpoint to get status of workers
  It would be useful to know if we have any workers associated with the system, and, if so, if they are busy.
  
  Specifically, this could probably be something like is done in girder_worker (see https://github.com/girder/girder_worker/blob/master/girder_worker/girder_plugin/api/worker.py#L40-L55).  For this purpose, the celery app can be reached via `from rgd import celery_app`.
  
  Ideally, this let's us determine the following conditions:
  - The broker is unavailable 
  - There are no workers
  - The number of idle workers
  - The number of busy workers (and, ideally, what they are busy doing)
  
  In the future, we may have multiple worker pools (for instance, for GPU and non-GPU tasks), so this will probably change exactly what gets reported in the future.
  
  </issue>
  <code>
  [start of setup.py]
  1 from setuptools import setup
  2 
  3 setup(
  4     name='resonantgeodata',
  5     version='0.1',
  6     python_requires='>=3.8.0',
  7     install_requires=[
  8         'boto3',
  9         'celery!=4.4.4',
  10         'django',
  11         'django-admin-display',
  12         'django-allauth',
  13         'django-cleanup',
  14         'django-configurations[database]',
  15         'django-cors-headers',
  16         'django-crispy-forms',
  17         'django-extensions',
  18         'django-storages',
  19         'djangorestframework',
  20         'docker',
  21         'drf-yasg',
  22         'gputil',
  23         'psycopg2',
  24         'python-magic',
  25         'rules',
  26         'uritemplate',
  27         'whitenoise[brotli]',
  28         # Production-only
  29         'django-storages',
  30         'gunicorn',
  31         # Development-only
  32         'django-debug-toolbar',
  33         'django-minio-storage',
  34     ],
  35 )
  36
  [end of setup.py]
  [start of core/urls.py]
  1 from django.urls import path
  2 
  3 from . import views
  4 
  5 urlpatterns = [
  6     path('', views.index, name='index'),
  7     path('algorithms/', views.algorithms, name='algorithms'),
  8     path(
  9         'algorithms/<str:creator>/<int:pk>/',
  10         views.AlgorithmDetailView.as_view(),
  11         name='algorithm-detail',
  12     ),
  13     path(
  14         'algorithms/<str:creator>/<int:pk>/delete/',
  15         views.AlgorithmDeleteView.as_view(),
  16         name='delete-algorithm',
  17     ),
  18     path('algorithms/new/', views.AlgorithmCreateView.as_view(), name='new-algorithm'),
  19     path('jobs/', views.jobs, name='jobs'),
  20     path('jobs/new/', views.JobCreateView.as_view(), name='new-job'),
  21     path('jobs/<str:creator>/<int:pk>/', views.JobDetailView.as_view(), name='job-detail'),
  22     path('tasks/', views.tasks, name='tasks'),
  23     path('task/<int:pk>-<str:name>/', views.TaskDetailView.as_view(), name='task-detail'),
  24     path('api/download/<model>/<int:id>/<field>', views.download_file, name='download-file'),
  25 ]
  26 
  27 handler500 = views.handler500
  28
  [end of core/urls.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/core/urls.py b/core/urls.py
  --- a/core/urls.py
  +++ b/core/urls.py
  @@ -1,7 +1,11 @@
  +from django.contrib import admin
   from django.urls import path
  +from djproxy.urls import generate_routes
   
   from . import views
   
  +
  +admin.site.index_template = 'admin/add_flower.html'
   urlpatterns = [
       path('', views.index, name='index'),
       path('algorithms/', views.algorithms, name='algorithms'),
  @@ -22,6 +26,6 @@
       path('tasks/', views.tasks, name='tasks'),
       path('task/<int:pk>-<str:name>/', views.TaskDetailView.as_view(), name='task-detail'),
       path('api/download/<model>/<int:id>/<field>', views.download_file, name='download-file'),
  -]
  +] + generate_routes({'flower-proxy': {'base_url': 'http://flower:5555/', 'prefix': '/flower/'}})
   
   handler500 = views.handler500
  diff --git a/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -17,6 +17,7 @@
           'django-extensions',
           'django-storages',
           'djangorestframework',
  +        'djproxy',
           'docker',
           'drf-yasg',
           'gputil',
  
verification_info: {"golden_diff": "diff --git a/core/urls.py b/core/urls.py\n--- a/core/urls.py\n+++ b/core/urls.py\n@@ -1,7 +1,11 @@\n+from django.contrib import admin\n from django.urls import path\n+from djproxy.urls import generate_routes\n \n from . import views\n \n+\n+admin.site.index_template = 'admin/add_flower.html'\n urlpatterns = [\n     path('', views.index, name='index'),\n     path('algorithms/', views.algorithms, name='algorithms'),\n@@ -22,6 +26,6 @@\n     path('tasks/', views.tasks, name='tasks'),\n     path('task/<int:pk>-<str:name>/', views.TaskDetailView.as_view(), name='task-detail'),\n     path('api/download/<model>/<int:id>/<field>', views.download_file, name='download-file'),\n-]\n+] + generate_routes({'flower-proxy': {'base_url': 'http://flower:5555/', 'prefix': '/flower/'}})\n \n handler500 = views.handler500\ndiff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -17,6 +17,7 @@\n         'django-extensions',\n         'django-storages',\n         'djangorestframework',\n+        'djproxy',\n         'docker',\n         'drf-yasg',\n         'gputil',\n", "issue": "Add an endpoint to get status of workers\nIt would be useful to know if we have any workers associated with the system, and, if so, if they are busy.\r\n\r\nSpecifically, this could probably be something like is done in girder_worker (see https://github.com/girder/girder_worker/blob/master/girder_worker/girder_plugin/api/worker.py#L40-L55).  For this purpose, the celery app can be reached via `from rgd import celery_app`.\r\n\r\nIdeally, this let's us determine the following conditions:\r\n- The broker is unavailable \r\n- There are no workers\r\n- The number of idle workers\r\n- The number of busy workers (and, ideally, what they are busy doing)\r\n\r\nIn the future, we may have multiple worker pools (for instance, for GPU and non-GPU tasks), so this will probably change exactly what gets reported in the future.\n", "before_files": [{"content": "from setuptools import setup\n\nsetup(\n    name='resonantgeodata',\n    version='0.1',\n    python_requires='>=3.8.0',\n    install_requires=[\n        'boto3',\n        'celery!=4.4.4',\n        'django',\n        'django-admin-display',\n        'django-allauth',\n        'django-cleanup',\n        'django-configurations[database]',\n        'django-cors-headers',\n        'django-crispy-forms',\n        'django-extensions',\n        'django-storages',\n        'djangorestframework',\n        'docker',\n        'drf-yasg',\n        'gputil',\n        'psycopg2',\n        'python-magic',\n        'rules',\n        'uritemplate',\n        'whitenoise[brotli]',\n        # Production-only\n        'django-storages',\n        'gunicorn',\n        # Development-only\n        'django-debug-toolbar',\n        'django-minio-storage',\n    ],\n)\n", "path": "setup.py"}, {"content": "from django.urls import path\n\nfrom . import views\n\nurlpatterns = [\n    path('', views.index, name='index'),\n    path('algorithms/', views.algorithms, name='algorithms'),\n    path(\n        'algorithms/<str:creator>/<int:pk>/',\n        views.AlgorithmDetailView.as_view(),\n        name='algorithm-detail',\n    ),\n    path(\n        'algorithms/<str:creator>/<int:pk>/delete/',\n        views.AlgorithmDeleteView.as_view(),\n        name='delete-algorithm',\n    ),\n    path('algorithms/new/', views.AlgorithmCreateView.as_view(), name='new-algorithm'),\n    path('jobs/', views.jobs, name='jobs'),\n    path('jobs/new/', views.JobCreateView.as_view(), name='new-job'),\n    path('jobs/<str:creator>/<int:pk>/', views.JobDetailView.as_view(), name='job-detail'),\n    path('tasks/', views.tasks, name='tasks'),\n    path('task/<int:pk>-<str:name>/', views.TaskDetailView.as_view(), name='task-detail'),\n    path('api/download/<model>/<int:id>/<field>', views.download_file, name='download-file'),\n]\n\nhandler500 = views.handler500\n", "path": "core/urls.py"}]}