app.py 603 B

1234567891011121314151617181920
  1. """general methods"""
  2. from app import LOGGER, api, database, functions
  3. def update_resource_market():
  4. """update resource market"""
  5. LOGGER.info('Get player market')
  6. player_market = api.get_player_market()
  7. LOGGER.info('Got player market')
  8. functions.print_player_market(player_market)
  9. LOGGER.info('Get state market')
  10. state_market = api.get_state_market()
  11. LOGGER.info('Got state market')
  12. functions.print_state_market(state_market)
  13. LOGGER.info('saving markets')
  14. database.save_resource_market(player_market, state_market)
  15. LOGGER.info('done saving markets')