Conversation
2. Add resend article recruit email to event and publication model 3. Add resend method in mailer 4. fix error in calling update method in publication model
| end | ||
| end | ||
| end | ||
| end No newline at end of file |
There was a problem hiding this comment.
Layout/TrailingBlankLines: Final newline missing.
| end | ||
| event :await_claim do | ||
| transitions from: :recruiting_authors, to: :awaiting_claim | ||
| transitions from: [:recruiting_authors, :resending_recruiting_authors], to: :awaiting_claim |
There was a problem hiding this comment.
Style/SymbolArray: Use %i or %I for an array of symbols.
| RESEND_EMAIL_ARTICLE_RECRUIT = { name: 'Resend article recruit with email saved in AuthorPublication', | ||
| status: STARTED[:name], | ||
| restartable: true, | ||
| restartable_state: JSON.dump(method: RESTARTABLE_METHODS[:resend_email_article_recruit]) } |
There was a problem hiding this comment.
Layout/AlignHash: Align the elements of a hash literal if they span more than one line.
| restartable_state: JSON.dump(method: RESTARTABLE_METHODS[:email_article_recruit]) } | ||
| RESEND_EMAIL_ARTICLE_RECRUIT = { name: 'Resend article recruit with email saved in AuthorPublication', | ||
| status: STARTED[:name], | ||
| restartable: true, |
There was a problem hiding this comment.
Layout/AlignHash: Align the elements of a hash literal if they span more than one line.
| restartable: true, | ||
| restartable_state: JSON.dump(method: RESTARTABLE_METHODS[:email_article_recruit]) } | ||
| RESEND_EMAIL_ARTICLE_RECRUIT = { name: 'Resend article recruit with email saved in AuthorPublication', | ||
| status: STARTED[:name], |
There was a problem hiding this comment.
Layout/AlignHash: Align the elements of a hash literal if they span more than one line.
| rescue => e | ||
| msg = 'EmailArticleRecruitJob.perform' | ||
| NotificationManager.log_exception(logger, msg, e) | ||
| event.error(restartable: true, message: "#{msg} : #{e.message}") if event |
There was a problem hiding this comment.
Style/SafeNavigation: Use safe navigation (&.) instead of checking if an object exists before calling the method.
| status: Event::EMAIL[:name] | ||
| ) | ||
| publication.await_claim! | ||
| rescue => e |
There was a problem hiding this comment.
Style/RescueStandardError: Avoid rescuing without specifying an error class.
|
|
||
| event.update( | ||
| publication: publication, | ||
| message: "Initiated by #{current_user ? current_user[:email] : system_email }", |
There was a problem hiding this comment.
Layout/SpaceInsideStringInterpolation: Space inside string interpolation detected.
| # Defaults to 0 | ||
| # job_options retry: 0 | ||
|
|
||
| def perform(publication:, current_user: nil, previous_event: nil) |
There was a problem hiding this comment.
Metrics/AbcSize: Assignment Branch Condition size for perform is too high. [34.32/15]
Metrics/CyclomaticComplexity: Cyclomatic complexity for perform is too high. [9/6]
Metrics/MethodLength: Method has too many lines. [26/10]
Metrics/PerceivedComplexity: Perceived complexity for perform is too high. [9/7]
|
fixes #223 |
No description provided.