Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(character-affiliation): refactor character affiliation job to p… #654

Closed
wants to merge 3 commits into from

Conversation

herpaderpaldent
Copy link
Contributor

…rocess missing character infos

Copy link

what-the-diff bot commented Jun 26, 2024

PR Summary

  • Added Reference to Character Info
    The reference to CharacterInfo model from the Eveapi package is added in CharacterAffiliationJob.php. This will allow the use of CharacterInfo model functions inside our file.

  • New Methods in CharacterAffiliationJob.php
    Three new methods are introduced. The getMissingIdsArrayFromCharacterInfo() helps to get a list of IDs that are not available in CharacterInfo. processAffiliations() and throttleAndProcessAffiliations() are used to manage and handle (in a controlled rate) the character affiliations respectively.

  • Improved executeJob() Method
    The executeJob() method does its actions now using a match expression, which is a clearer and more streamlined way to write out decision-making code than using multiple if statements.

  • Renamed Methods
    For clarity, we've renamed two methods in CharacterAffiliationJob.php. Now, their names reflect that they return arrays, not individual items.

  • Updated updateOrCreateCharacterAffiliations() Method
    This method now accepts an array of character IDs instead of a collection, which makes the inputs more flexible and easier to handle.

  • Added Testing Components
    In CharacterAffiliationLifeCycleTest.php, several new references are added. These references are crucial for setting up our testing environment correctly. A new test case has been created to ensure the program behaves correctly when a CharacterInfo object has no character_affilations.

@herpaderpaldent herpaderpaldent deleted the fix/missing-character-affiliations branch June 29, 2024 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant