Exception: ActiveJob::QueueAdapters::ActiveElasticJobAdapter::SerializedJobTooBig

Inherits:
Error
  • Object
show all
Defined in:
lib/active_job/queue_adapters/active_elastic_job_adapter.rb

Overview

Raised when job exceeds 256 KB in its serialized form. The limit is imposed by Amazon SQS.

Instance Method Summary collapse

Constructor Details

#initialize(serialized_job) ⇒ SerializedJobTooBig

Returns a new instance of SerializedJobTooBig.



26
27
28
29
30
31
32
# File 'lib/active_job/queue_adapters/active_elastic_job_adapter.rb', line 26

def initialize(serialized_job)
  msg = "The job contains \#{serialized_job.bytesize} bytes in its serialzed form,\nwhich exceeds the allowed maximum of \#{MAX_MESSAGE_SIZE} bytes imposed by Amazon SQS.\n  MSG\n  super msg\nend\n"