Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(1) Enable hash server usage (2) Introduce key scheduler #1677

Merged
merged 6 commits into from
Jan 9, 2017
Merged

(1) Enable hash server usage (2) Introduce key scheduler #1677

merged 6 commits into from
Jan 9, 2017

Conversation

chowder
Copy link
Contributor

@chowder chowder commented Jan 5, 2017

Description

The KeyScheduler class in scheduler.py serves as the basic building
block for more complex scheduling in the future (throttling by ms, query
remaining hashes, etc). Similar to how BaseScheduler is used for more complex scan methods.

Usage is similar to any args that are usually parsed as a list:
ex: -hk KEY_1 -hk KEY_2 -hk KEY_3

Motivation and Context

Enables 0.51 API usage.

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

chowderchow added 2 commits January 5, 2017 20:02
The KeyScheduler class in scheduler.py serves as the basic building
block for more complex scheduling in the future (throttling by ms, query
remaining hashes, etc).

Usage is similar to any args that are usually parsed as a list:
ex: -hk KEY_1 -hk KEY_2 -hk KEY_3
@hokiepokedad
Copy link
Contributor

I'm assuming I can't submit a PR of a PR can I? :)

@sclo012
Copy link

sclo012 commented Jan 6, 2017

This needs to be merged as soon as possible so the people that wants to use .51 can start using it.

@Skorfius
Copy link

Skorfius commented Jan 6, 2017

@sclo012 u could always merge it on ur own if you want it that badly!

@hokiepokedad
Copy link
Contributor

@ChowderChow are you going to merge my Hash Key status page for -ps into this?

@chowder
Copy link
Contributor Author

chowder commented Jan 6, 2017

@hokiepokedad that will come after basic functionality is merged, though I'd prefer if you'd be the one to open a separate PR for that seeing as most of the code was yours.

@hokiepokedad
Copy link
Contributor

@ChowderChow sounds good

@tokar86a
Copy link

tokar86a commented Jan 7, 2017

Hope we are going to see this one merge soon :)

@fufufabulous
Copy link

fufufabulous commented Jan 8, 2017

i get this when i want to use -hk

2017-01-08 11:39:04,543 [ search-worker-2][ search][ ERROR] Exception in search_worker under account ****** Exception message: .
Traceback (most recent call last):
File "/****/PokemonGo-Map/pogom/search.py", line 602, in search_worker_thread
api.activate_hash_server(key)
File "/opt/python/lib/python2.7/site-packages/pgoapi/pgoapi.py", line 155, in getattr
raise AttributeError
AttributeError

@zhomz
Copy link

zhomz commented Jan 8, 2017

I get the same exception as @fufufabulous

pogom/search.py Show resolved Hide resolved
@fufufabulous
Copy link

Thanks it works now, how can we know the amount of requests/min ?

# Create the key scheduler.
if args.hash_key:
key_scheduler = schedulers.KeyScheduler(args.hash_key).scheduler()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If turning the other logs to debug, then maybe a single info message here to say that hash server is enabled?

@sebastienvercammen sebastienvercammen merged commit bc8ea81 into RocketMap:develop Jan 9, 2017
trew added a commit to trew/PokemonGo-Map that referenced this pull request Jan 13, 2017
* origin/develop:
  Thread safe webhooks & minor enhancements. (RocketMap#1710)
  Update step distance according to pgoapi changes & test results. (RocketMap#1707)
  Updated cachetools. (RocketMap#1705)
  [Readme] Remove old paypal stuff
  (1) Enable hash server usage (2) Introduce key scheduler (RocketMap#1677)

# Conflicts:
#	pogom/models.py
#	pogom/schedulers.py
dev042 pushed a commit to dev042/RocketMap that referenced this pull request Feb 20, 2017
)

* (1) Enable hash server usage (2) Introduce key scheduler

The KeyScheduler class in scheduler.py serves as the basic building
block for more complex scheduling in the future (throttling by ms, query
remaining hashes, etc).

Usage is similar to any args that are usually parsed as a list:
ex: -hk KEY_1 -hk KEY_2 -hk KEY_3

* flake8

* Missing periods in comments

* Update requirements.txt to use 0.51 API.

* Get pgoapi from commit rather than develop branch.

* Small debugging changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants