A framework for quick web archiving
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
847 B

  1. STATUS_TODO = 0
  2. '''Status of an item that has not been processed yet'''
  3. STATUS_INPROGRESS = 1
  4. '''Status of an item that is currently being processed'''
  5. STATUS_DONE = 2
  6. '''Status of an item that has been processed'''
  7. #TODO: Add a STATUS_ERROR?
  8. ACTION_SUCCESS = 0
  9. '''Treat this response as a success'''
  10. ACTION_IGNORE = 1 #TODO Replace with ACTION_SUCCESS since it's really the same thing.
  11. '''Ignore this response'''
  12. ACTION_RETRY = 2
  13. '''Retry the same request'''
  14. ACTION_FOLLOW_OR_SUCCESS = 3
  15. '''If the response contains a Location or URI header, follow it. Otherwise, treat it as a success.'''
  16. #TODO: Rename to ACTION_FOLLOW maybe? However, the current name makes it more clear what qwarc does when there's a redirect without a redirect target...
  17. ACTION_RETRIES_EXCEEDED = 4
  18. '''This request failed repeatedly and exceeded the retry limit.'''