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.
Updated CharMarketOrders to fit with the changes made to make CorpMarketOrders functional. CharMarketOrders should not be functional with official confirmation puts only. Testing is still necessary.
Wrote in presence validations for all CacheTimes attributes. Implemented the has many <-> bleongs to association between CacheTimes & Users and CacheTimes & Apis
Added accessmasks to api factories.
Added puts for logging purposes to ApiActiveChecker, CharWalletTransactions and CorpWalletTransactions. Updatd their methods with the same api_id and cache_time_id variables as the other modules.
Clarified and improved cron log messages.
Added basic CacheTimes update machinery to ApiActiveChecker. This is not the complete method but is necessary to reduce erroneous calls to the server.
Improved ApiActiveChecker to only create a new CacheTimes object when the APi is active.
Finished CharMarketOrders CacheTimers machinery.
Wrote basic response tests for the CacheTimes model.
Wrote basic model specs for CacheTimes and cleaned up has_many and belongs_to syntax on MarketOrder, Api and CacheTimes.