Module: AppEngine::Labs::TaskQueue
- Defined in:
- lib/appengine-apis/labs/taskqueue.rb
Defined Under Namespace
Classes: InternalError, Queue, Task, TaskAlreadyExistsError, TransientFailureError
Constant Summary collapse
Class Method Summary collapse
-
.add(*args) ⇒ Object
Convenience method will create a Task and add it to the default queue.
- .convert_exceptions ⇒ Object
Class Method Details
.add(*args) ⇒ Object
Convenience method will create a Task and add it to the default queue.
Args:
-
args: Passed to the Task constructor.
Returns:
-
The Task that was added to the queue.
245 246 247 |
# File 'lib/appengine-apis/labs/taskqueue.rb', line 245 def self.add(*args) Task.new(*args).add end |
.convert_exceptions ⇒ Object
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 |
# File 'lib/appengine-apis/labs/taskqueue.rb', line 249 def self.convert_exceptions begin yield rescue java.lang.IllegalArgumentException => ex raise ArgumentError, ex. rescue UnsupportedTranslationException => ex raise ArgumentError, ex. rescue TaskAlreadyExistsException => ex raise TaskAlreadExistsError, ex. rescue InternalFailureException => ex raise InternalError, ex. rescue TransientFailureException => ex raise TransientFailureError, ex. end end |