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

[Ready for Testing] DB-Code Refactoring & Moncole-Alternate support #353

Closed
wants to merge 111 commits into from

Conversation

Projects
None yet
5 participants
@123FLO321
Copy link
Collaborator

commented Jan 26, 2018

Description

Moved all queries to a new class.
This allows easy support for different Scanners and even DB types.
Currently RocketMap [MySQL] and the Monocle-Alternate [MySQL and PgSQL] fork are implemented.
The DB Type can be set via in config.php. ["rocketmap", "monocle-alt-mysql" or "monocle-alt-pgsql"].

Run CreateStatsRocketMap.sql or CreateStatsMonocle.sql for counts to work.

Requires PR 27 Moncole-Alternate
Recommended Settings for Moncole-Alternate:

KEEP_GYM_HISTORY = True
CLEANUP_SIGHTINGS_OLDER_THAN_X_HR = 168.0 (or higher | min: 24.0)
CLEANUP_FORT_SIGHTINGS_OLDER_THAN_X_HR = -1.0 (or 168.0 or higher)
CLEANUP_GYM_DEFENDERS_OLDER_THAN_X_HR = -1.0 (or 168.0 or higher)
RAIDERS_PER_GYM = 0.1 (target update interval of ~60s)

ToDo

  • Test RocketMap
  • Test Moncole-Alternate MySQL
  • Test Moncole-Alternate PgSQL
  • Implement the Trainer-Page for Moncole-Alternate once it stores levels in the dB
  • Implement Gymhistory for Moncole-Alternate

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)

123FLO321 and others added some commits Jan 20, 2018

Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
.
.
Florian Kostenzer
Merge branch 'db-types' of https://github.com/123FLO321/Worldopole in…
…to db-types

Conflicts:
	core/process/data.loader.php

123FLO321 added some commits Feb 19, 2018

@123FLO321 123FLO321 referenced this pull request Feb 21, 2018

Closed

Improve Nests page #363

1 of 3 tasks complete

@123FLO321 123FLO321 changed the title [WIP | Ready for Testing] DB-Code Refactoring & Moncole-Alternate support [Ready for Testing] DB-Code Refactoring & Moncole-Alternate support Feb 21, 2018

@Obihoernchen Obihoernchen added review ready and removed WIP labels Feb 23, 2018

@123FLO321 123FLO321 referenced this pull request Feb 28, 2018

Merged

Fix errors from 349 #367

1 of 3 tasks complete

123FLO321 added some commits Feb 28, 2018

fix conflicts
Conflicts:
	core/cron/pokedex_counts.cron.php
	pages/gymhistory.page.php
@Obihoernchen
Copy link
Collaborator

left a comment

I get the following error:

PHP Fatal error:  Declaration of QueryManagerPostgresqlMonocleAlternate::getNestData($time, $minLatitude, $maxLatitude, $minLongitude, $maxLongitude) must be compatible with QueryManager::getNestData() in .../core/process/queries/QueryManagerPostgresqlMonocleAlternate.php on line 708
@Obihoernchen
Copy link
Collaborator

left a comment

Seems to work fine with RM

@michikrug michikrug referenced this pull request Feb 3, 2019

Merged

Combine PR #353 with #363 & Code formatting #371

1 of 3 tasks complete
@Obihoernchen

This comment has been minimized.

Copy link
Collaborator

commented Apr 1, 2019

Now in #371

Obihoernchen added a commit that referenced this pull request Apr 1, 2019

Combine PR #353 with #363 & Code formatting (#371)
* added no_lures to default config

* Implementet no_lures

* Separated no gyms and show raids on homepage

* added missing setting in example

* styling fixes

* === not ==

* Scrutinizer Auto-Fixes

This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com

* Revert "Scrutinizer Auto-Fixes"

* fix code style

* tab not spaces

* .

* .

* last style fix

* get pokecountdata in crontabs.include

* add IDE files to .gitigonore

* updatet how counts are stored

* remove from data loader

* make scrutinizer happy

* remove lures from dashboard as well

* Update aru.php

* Added query.php and basic quieries for monocle and rocketmap & implemented in tester.php

* woops - the lines in data_loader where in use

* Added support in homepage

* finisched data.loader

* moved to classes instead

* close mysqli on destruct

* added gyms and stops

* add default values for all 801 pokemon

* fixes

* added raids

* added trainers in aru

* finished aru.php

* added trainer graph

* renames

* finished cron

* fixes

* styling fixes

* fixed time_offset for RocketMap

* renamed Hydro to Alt

* revert name change

* add example

* add posgresql for monocle-alt + fixes

* fix nest spawn time

* fix error when no active raids

* Fix Monocle-Alt-Psql tester

* fix monocle mysql

* replace && with AND in quieries

* fix empty last scanned

* init $nestsdatas

* fix getPokemonSinceLastUpdate query logic

* fix pokemon count

* fix top50

* fix top trainers

* removed unused select

* fix typos

* fix nests

* fix netst times

* fixed nest spawn times

* fix nest times

* fix pokemon count for monocle

* use spawn instead of despawn time

* fixe error if file is countfiles are empty

* Added Gymhistory (Not support for Monocle yet)

* fix $_GET used in QueryManagers

* Fixed seen per day

* fix getGymData

* Update home.page.php

* Update aru.php

* make getRecentMythic faster

* make getRecentMythic faster

* add Trainers and GymHistory

* fix recent

* Update QueryManagerMysqlMonocleAlternate.php

* Update QueryManagerPostgresqlMonocleAlternate.php

* Update QueryManagerMysqlMonocleAlternate.php

* Update QueryManagerPostgresqlMonocleAlternate.php

* Update QueryManagerMysqlMonocleAlternate.php

* Update QueryManagerPostgresqlMonocleAlternate.php

* Update QueryManagerMysqlMonocleAlternate.php

* Update QueryManagerPostgresqlMonocleAlternate.php

* fixes

* fix pokemon depolyment time

* Update trainer.content.js

* Update trainer.content.js

* Update trainer.content.js

* Update trainer.content.js

* Update trainer.content.js

* improve some pokemon-page queries

* fix conflict

* fix getTrainerLevelCount for RocketMap

* Improve Pokemon and Raid count storage

* Add Create Stats sql

* fix CreateStatsRocketMap.sql

* # This is a combination of 20 commits.
# The first commit's message is:
improve nests

# The 2nd commit message will be skipped:

#	remove debug comment

# The 3rd commit message will be skipped:

#	update variables example

# The 4th commit message will be skipped:

#	Update index.php

# The 5th commit message will be skipped:

#	scale by size

# The 6th commit message will be skipped:

#	remove

# The 7th commit message will be skipped:

#	add simple support for relations

# The 8th commit message will be skipped:

#	fix woops

# The 9th commit message will be skipped:

#	fix typo and improve error check

# The 10th commit message will be skipped:

#	Update nests.cron.php

# The 11th commit message will be skipped:

#	nature_reserve is not a nest

# The 12th commit message will be skipped:

#	Fix fast update

# The 13th commit message will be skipped:

#	fix order + fix 12h update

# The 14th commit message will be skipped:

#	Update crontabs.include.php

# The 15th commit message will be skipped:

#	Save last update date in case of abort

# The 16th commit message will be skipped:

#	use $prevNestTime

# The 17th commit message will be skipped:

#	improve memory usage (maybe?)

# The 18th commit message will be skipped:

#	fix if core/json/nests.parks.json doesn't exist

# The 19th commit message will be skipped:

#	improved multipolygon

# The 20th commit message will be skipped:

#	run 12h update from 12-24 after migration

* add option for min nest size

* split nest calc into 0.5x0.5 areas

* hide nest inside nests of same pokemon + fixes and improvements

* fix for relations with multiple polygons

* garden is leisure not landuse

* How did this get here?

* Update nests.cron.php

* fix osm query date and reorder it

* Fix timezone in CreateStatsRocketMap

* fix timezone in CreateStatsRocketMap.sql

* fix getTop50Trainers

* fix getTop50Trainers

* Update CreateStatsRocketMap.sql

* Update CreateStatsRocketMap.sql

* fix timezone in nest update timing

* fix Postgre - Monocle

* fix Postgre - Monocle

* Fix QueryManagerPostgresqlMonocleAlternate

* Format php files

* Format Rocketmap queries

* Temporary disable start and end times of nests spawns

* Fix broken queries

* Format php files

* Fix nest query

* Readd css to cached files

* Minor fix

* Use namespaces

* Minor fix

* Check for file existence
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.