Module npsgd_queue :: Class WorkerHasTask
[hide private]
[frames] | no frames]

Class WorkerHasTask

source code

                object --+        
                         |        
tornado.web.RequestHandler --+    
                             |    
           QueueRequestHandler --+
                                 |
                                WorkerHasTask

HTTP handler for workers ensuring that a job still exists.

This handler helps eliminate certain race conditions in NPSGD. Before a worker sends an e-mail with job results, it checks back with the queue to make sure that the job hasn't already been handler by another worker (this could happen if the queue declares that the first worker had timed out). If there is no task with that id still in the processing list then an e-mail being sent out would be a duplicate.

Instance Methods [hide private]
 
get(self, taskIdString) source code

Inherited from QueueRequestHandler: checkSecret

Inherited from tornado.web.RequestHandler: __init__, async_callback, check_xsrf_cookie, clear, clear_all_cookies, clear_cookie, delete, finish, flush, get_argument, get_arguments, get_browser_locale, get_cookie, get_current_user, get_error_html, get_login_url, get_secure_cookie, get_template_path, get_user_locale, head, initialize, on_connection_close, options, post, prepare, put, redirect, render, render_string, require_setting, reverse_url, send_error, set_cookie, set_header, set_secure_cookie, set_status, static_url, write, xsrf_form_html

Inherited from tornado.web.RequestHandler (private): _cookie_signature, _execute, _generate_headers, _handle_request_exception, _log, _request_summary, _stack_context, _ui_method, _ui_module

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from tornado.web.RequestHandler: SUPPORTED_METHODS

Inherited from tornado.web.RequestHandler (private): _ARG_DEFAULT

Properties [hide private]

Inherited from tornado.web.RequestHandler: cookies, current_user, locale, settings, xsrf_token

Inherited from object: __class__

Method Details [hide private]

get(self, taskIdString)

source code 
Overrides: tornado.web.RequestHandler.get