pokeminer icon indicating copy to clipboard operation
pokeminer copied to clipboard

gyms aren't updated.

Open vDrag0n opened this issue 8 years ago • 14 comments

Is this behavior expected? I don't see anywhere in the code where gyms are updated.

vDrag0n avatar Aug 09 '16 07:08 vDrag0n

There was an issue with the api, while getting the map_objects. PGOAPI#47

vanwinkelseppe avatar Aug 09 '16 07:08 vanwinkelseppe

if you are talking about gyms.py - yes it is intended to not autoupdate

Aiyubi avatar Aug 09 '16 10:08 Aiyubi

@Aiyubi I think he means that after X amount of time the Gyms change from team to team on the map. Or in the report using more recent data but my map has been running 10 hours and the gym's are added to the db, one sighting is added after that Gym's are not touched (No other sightings are added). Which means the data is outdated. Generated 0 minutes ago using data from 1054 minutes ago gathered by pokeminer

vanwinkelseppe avatar Aug 09 '16 13:08 vanwinkelseppe

Same here. Gyms don't update.

dhpancor avatar Aug 09 '16 19:08 dhpancor

Mine seem to be updating fine, using MySQL for database.

andrewbroberg avatar Aug 10 '16 01:08 andrewbroberg

Reporting the same issues using sqllite

batttie avatar Aug 10 '16 03:08 batttie

I think I found several logical issues with the sorting and caching. Im on it right now.

Aiyubi avatar Aug 10 '16 07:08 Aiyubi

Is this related to the live map, or to the entries in database? Entries in database are updating fine (at least for me), and gyms.py also uses new results. I'm not sure about the live map.

modrzew avatar Aug 10 '16 08:08 modrzew

@modrzew since I am bad with sql and stuck I will tell you my first finding:

        existing = session.query(FortSighting) \
            .filter(FortSighting.fort_id == fort.id) \
            .filter(FortSighting.team == raw_fort['team']) \
            .filter(FortSighting.prestige == raw_fort['prestige']) \
            .filter(FortSighting.guard_pokemon_id ==
                    raw_fort['guard_pokemon_id']) \
            .first()
        if existing:
            # Why it's not in cache? It should be there!
            FORT_CACHE.add(raw_fort)
            return

So what if:

  • I capture a gym with my pigeon it has 2000 prestige
  • Someone from another team captures it
  • I capture it again with the same pigeon -> existing is true and it is not in the cache

Aiyubi avatar Aug 10 '16 09:08 Aiyubi

told you earlier I'm bad with sql? turns out I am not as bad as I thought

running the query in get_forts results in always the oldest data query the sql from get_forts through mysql interface: works perfectly fine and results in newest data

edit: I'm going crazy. Now it is not working in mysql anymore

Aiyubi avatar Aug 10 '16 10:08 Aiyubi

@modrzew The problem is in both. (In python 2.7) Gyms are not updated on live map or neither in the gym report. This is my gym report footer: Generated 0 minutes ago using data from 2403 minutes ago gathered by pokeminer data is more then 40 hours out of date. From what I can see, the gym's are updating in the database. schermafbeelding 2016-08-10 om 14 21 41

vanwinkelseppe avatar Aug 10 '16 12:08 vanwinkelseppe

Might this be the same issue as in #172? If so, you could try upgrading to v0.5.1 and see whether the issue goes away.

modrzew avatar Aug 10 '16 12:08 modrzew

@modrzew as I tried to comment on that issue: get_forts with that fix returns all entrys

>>> len(db.get_forts(session))
80219

Aiyubi avatar Aug 10 '16 12:08 Aiyubi

okay #198 is a fix that works for me

Aiyubi avatar Aug 10 '16 18:08 Aiyubi