Givdo / givdo_api_server

1 stars 0 forks source link

Schedule givdo:organizations:cache task to periodically update nonprofits #22

Open diegotoral opened 7 years ago

balajisubr commented 7 years ago

@diegotoral can you help me get started on this by providing a brief overview of how the app and server interact and the existing API end points? should take a max of half hour. Let me know what your time zone is. I would ideally like to get started tomorrow

diegotoral commented 7 years ago

Hi @balajisubr! It looks that this task is poorly described and causing confusion. All code related to this task is already done what we missed was just a configuration to periodically run the rake command and update nonprofits' information.

I'll rename this task to avoid future confusion.

diegotoral commented 7 years ago

@balajisubr In case you want to check the code start at https://github.com/Givdo/givdo_api_server/blob/master/lib/tasks/organizations.rake#L4

balajisubr commented 7 years ago

@diegotoral There are multiple approaches to doing this. I prefer to use Resque/Redis for this. If there are not going to be that many periodic tasks, I could add a cron entry and run the script from there. There is also a 'whenever' gem. Do you have any suggestions ?