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

Improve update_hoc_map cronjob. #17031

Merged
merged 1 commit into from Aug 11, 2017
Merged

Improve update_hoc_map cronjob. #17031

merged 1 commit into from Aug 11, 2017

Conversation

ashercodeorg
Copy link
Contributor

@ashercodeorg ashercodeorg commented Aug 11, 2017

Makes several improvements to the existing cronjob.

  1. Assures the file is closed, by wrapping the open in a begin-ensure block.
  2. Pages through the matching forms rather than loading them all into memory at once.
  3. Freezes constants.
  4. Defines CURRENT_HOC_SIGNUP.

@ashercodeorg
Copy link
Contributor Author

FYI @aoby.

next if form[:review] != "approved" && processed_data['location_city_s'].nil?

row = [form[:id], data['organization_name_s'], processed_data['location_city_s'], processed_data['location_p'], form[:review], data['special_event_details_s']]
csv << row
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: Though not immediately clear from the GitHub UI, nothing was changed inside this inner block.

@ashercodeorg ashercodeorg merged commit c45047b into staging Aug 11, 2017
@ashercodeorg ashercodeorg deleted the pageForms branch August 11, 2017 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants