Skip to content

Commit

Permalink
update the beehive doc so we're not telling users to do the wrong thi…
Browse files Browse the repository at this point in the history
…ng and making support more difficult (RocketMap#1221)
  • Loading branch information
beccasafan authored and FrostTheFox committed Sep 8, 2016
1 parent 5101b05 commit 73c68b2
Showing 1 changed file with 19 additions and 58 deletions.
77 changes: 19 additions & 58 deletions docs/extras/beehive.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
# Beehive

## Setting up
## Visual Representation

**Note:** This guide runs on Windows with Python and Git installed.
![](https://camo.githubusercontent.com/d65ac33656b410549aadfc9975f2f1a779ae437c/687474703a2f2f693330342e70686f746f6275636b65742e636f6d2f616c62756d732f6e6e3138362f736f6c6563616a756e2f426565686976652532304578706c616e6174696f6e2e706e67)

First, make a copy of [this Google Sheets page](https://docs.google.com/spreadsheets/d/1Uh4VITpCciSy8pRh9I7OZuNiM-LizyBJcU7WR8oi7yY/edit#gid=263691484). We'll come back to that later.
## Get Ready

Now open a Terminal and clone the develop branch to a local directory:
The beehive script works by specifying only the parameters that are different for each worker on the command line. All other parameters are taken from [the config file](https://github.com/PokemonGoMap/PokemonGo-Map/blob/develop/config/config.ini.example).

To ensure that your beehive will run correctly, first make sure that you can run purely from the config file:

```
git clone -b develop https://github.com/PokemonGoMap/PokemonGo-Map.git
python runserver.py
```

Go to Tools / Hex-Beehive-Generator:
If this runs ok, you should be good to go!

## Get Set

Open a Terminal or Command Window to the Tools / Hex Beehive Generator directory:

```
cd PokemonGo-Map/Tools/Hex-Beehive-Generator/
```

Now generate coordinates with `location_generator.py`:

***NOTE:*** Carefully read [these instructions](https://github.com/PokemonGoMap/PokemonGo-Map/blob/develop/docs/extras/beehive.md) for the proper arguments.

```
python location_generator.py -st stepsize -lp ringsize -lat yourstartinglathere -lon yourstartinglonghere
```
Expand All @@ -30,59 +38,12 @@ For example:
python location_generator.py -st 5 -lp 4 -lat 39.949157 -lon -75.165297
```

Now the terminal will output a list of coordinates. Copy this entire list of coordinates, and then head over to your saved copy of the Google Sheets page we made earlier.

We are going to paste all of the coords you just copied, into the first section of colored spaces, starting with the Top Pink one (ctrl v will do it automagically!)

Now, make a file named `beehive.bat` with the following content:

```
:: Set PythonPath to where your Python is installed, Typically C:\Python27\Python.exe
:: Set BranchPath to where you have the Pokemon Live Map folder
SET PythonPath=
SET BranchPath=
SET Executable=runserver.py
::GAPI is your google map api key
::auth is the authentication service you are using. PTC or Google
::Self explanatory, username of the chosen auth service
::again.. do i need to explain? password of chosen auth
::Threads default is 1, if you want more, change it here.. 1 is recommended until multithreading is fixed in windows.
::locale is the language output in your terminal, default is EN (english)
This will generate a beehive.bat (or beehive.sh for non-Windows) file in the main map directory.

SET GAPI=
SET auth=
SET username=
SET password=
SET thread=-t 1
SET locale=EN
::kill all python processes
:start
cls
taskkill /IM python.exe /F
echo Starting worker processes....
::title of this command window
title Pokemon Go Map
::paste the second column of colors here, down to the last space of the color you wanted. Pink = 1 Leap, Purple - 2 Leaps, Blue = 3 Leaps, Green = 4 Leaps, and Yellow = 5 Leaps. The amount of workers required gets silly after 5 Leaps :P)
::this part is the time it will pause till going back to the start again to restart the servers (edit the 1801 to change the delay in seconds)
echo Waiting 30 minutes to restart all processes
ping 127.0.0.1 -n 1801 > nul
goto start
```
## GO!

Now that we have our .bat created, We need to adjust the Arguments section on the spreadsheet. If you used the command for location_generator.py with -st set to 10, you need to change each line in the spreadsheet to -st 10 as well.
Run the .bat/.sh file to start the workers.

Now, we are going to copy and paste the last column of the spreadsheet, based on colors, into the space above in the .bat file designated for the commands. Save the file, then double click the .bat to start the workers!
## Troubleshooting

If your instances start but then immediately stop, take each line from the beehive file and run them one at a time manually. This will stop the window from automatically closing so that you can see what the actual error is.

0 comments on commit 73c68b2

Please sign in to comment.