Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slashes (/) in tube names #4

Open
drasch opened this issue May 4, 2011 · 0 comments
Open

slashes (/) in tube names #4

drasch opened this issue May 4, 2011 · 0 comments

Comments

@drasch
Copy link

drasch commented May 4, 2011

We use slashes in our tube names and they look like paths. This causes issues with the urls regex for the tube_stats view. I fixed this by adding / to the regex before the -

diff --git a/jack/beanstalk/urls.py b/jack/beanstalk/urls.py
index 51cbe4c..4e5c9a9 100644
--- a/jack/beanstalk/urls.py
+++ b/jack/beanstalk/urls.py
@@ -6,11 +6,11 @@ urlpatterns = patterns('',
     (r'^$', views.index),
     (r'^stats/$', views.stats),
     (r'^put/$', views.put),
-    (r'^ready/(?P<tube>[\w-]*)$', views.ready),
-    (r'^delayed/(?P<tube>[\w-]*)$', views.delayed),
-    (r'^buried/(?P<tube>[\w-]*)$', views.buried),
+    (r'^ready/(?P<tube>[\w\/-]*)$', views.ready),
+    (r'^delayed/(?P<tube>[\w\/-]*)$', views.delayed),
+    (r'^buried/(?P<tube>[\w\/-]*)$', views.buried),
     (r'^inspect/(?P<id>\d*)$', views.inspect),
-    (r'^tube/(?P<tube>[\w-]+)/stats/$', views.tube_stats),
+    (r'^tube/(?P<tube>[\w\/-]+)/stats/$', views.tube_stats),
     (r'^job/(?P<id>\d+)/delete/$', views.job_delete),
     (r'^job/(?P<id>\d+)/kick/$', views.job_kick),
 )

Thanks,
David

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant