jobs.py 560 B

12345678910111213141516
  1. """Jobs for scheduler module"""
  2. from app import app, api
  3. def check_resources(state_id, capital_id, resource_id, do_refill, alt):
  4. """Check resources and refill if necessary"""
  5. app.check_resources(state_id, capital_id, resource_id, do_refill, alt)
  6. def send_telegram_update(state_id, group_id, resource_type):
  7. """Send telegram update"""
  8. app.send_telegram_update(state_id, group_id, resource_type)
  9. def refill_resource(state_id, capital_id, resource_id, alt):
  10. """Execute refill job"""
  11. api.refill(state_id, capital_id, resource_id, alt)