Module: AppEngine::Labs::TaskQueue

Defined in:
lib/appengine-apis/labs/taskqueue.rb

Defined Under Namespace

Classes: InternalError, Queue, Task, TaskAlreadyExistsError, TransientFailureError

Constant Summary collapse

Blob =
AppEngine::Datastore::Blob

Class Method Summary collapse

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_exceptionsObject



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.message
  rescue UnsupportedTranslationException => ex
    raise ArgumentError, ex.message
  rescue TaskAlreadyExistsException => ex
    raise TaskAlreadExistsError, ex.message
  rescue InternalFailureException => ex
    raise InternalError, ex.message
  rescue TransientFailureException => ex
    raise TransientFailureError, ex.message
  end
end