Class: InboxSync::Notice::RunSyncError
- Defined in:
- lib/inbox-sync/notice/run_sync_error.rb
Constant Summary collapse
- BODY =
%{ :sync_name An error happened while running this sync. The error has been logged but no mail items from this sync's source are being sync'd. The runner will continue to attempt this sync so mails like this will continue until the problem is fixed. Error ===== :error_message (:error_name) :error_backtrace }.strip.freeze
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(smtp, config, data = {}) ⇒ RunSyncError
constructor
A new instance of RunSyncError.
- #subject ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(smtp, config, data = {}) ⇒ RunSyncError
Returns a new instance of RunSyncError.
23 24 25 26 27 28 |
# File 'lib/inbox-sync/notice/run_sync_error.rb', line 23 def initialize(smtp, config, data={}) @error = data[:error] @sync = data[:sync] super(smtp, config) end |
Instance Method Details
#body ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/inbox-sync/notice/run_sync_error.rb', line 34 def body @body ||= BODY. gsub(':sync_name', @sync.name). gsub(':error_message', @error.). gsub(':error_name', @error.class.name). gsub(':error_backtrace', @error.backtrace.join("\n ")) end |
#subject ⇒ Object
30 31 32 |
# File 'lib/inbox-sync/notice/run_sync_error.rb', line 30 def subject super("sync run error (#{@sync.uid})") end |