Added and migrated in the CacheTimes model. Compound index on :user_id and :api_id. This model will be the core of the cron job machinery.
Added a call_types translation table to cache_times.rb and built up part of the controller for cache_times. Modules seem like the best course of action for organizing code and allowing it to be used outside of cache_times_controller for new API enrollments.
Wrote basic untested corp market order update function. Needs supporting tests and testing. Logic looks good though.
Created an input_orders method in the corpmarketorders module. Included CorpMarketOrders in CacheTimesController and arranged to fire input_orders when a timer is finished with a call_type of 2. This will in turn fire the update method in CorpMarketOrders should it encounter a pre-existing order_id.
Added support for corpwallettransactions call_types to cache_times_controller. Built a CorpWalletTransactions module. The retrieve_corp_transactions method still needs to be built.
Built out CharMarketOrders, essentially a duplicate of corp market orders. It can be easily optimized by referencing CorpMarketOrder's update method. The code needs to be reviewed as it's mostly copy pasta.
Added support for CharWalletTransactions to CacheTimesController, retrieve_char_transactions(id) still needs to be built out. Cron Integration with whenever is necessary now.
Read up on rails runner and whenever and realized that accessing a controller method is difficult. So the logic from CacheTimesController has been moved to the CacheTimes class in /lib
Wrote a first pass at schedule.rb, whenever's config file. More reading is needed on rails runner and whenever's cron.
No methods written, just an empty file right now.
Configured schedule.rb and ran a crontab-update to build the first crontab, next up is seeing if it's working.
Included the module files into apis_controller as they will be needed to initialize new APIs in the CacheTimes table.
Successfully integrated cron jobs using the whenever gem. This required modification to the applications.rb file as well as updating of the schedule.rb file. Modules also had to be redone, presently the only functioning combination is cache_timers.rb and corp_market_orders.rb. The other possible paths remain dysfunctional at best.
Modified CorpMarketOrders.update to properly iterate through updating orders.
Added cache_time_id to CorpMarketOrders.input_orders method. This is used for deleting the old timer after creating a new one. This means that at each call a new CacheTimes object is created and inserted into the database while the previous one is deleted. The delete machinery is also outside the active loop, so CacheTimes objects associated with inactive APIs get deleted the first time they're called after becoming inactive.
Built up machinery to create new CacheTimes objects for each API when it is enrolled. This creates an object for each of the five supported types based on what type of API was enrolled.
Added the 'self.' prefix to all module methods to eliminate errors caused by CacheTimers.checktimes hitting unfinished methods.
Built cache_timer factory to produce CacheTimes objects for testing.
Removed market_orders_controller as it was redundant after implementing the cache_timers module and it's associate modules.
Removed testing puts and left in only official confirmation puts for use in logging.