These are chat archives for arenanet/api-cdi

25th
Feb 2017
Archomeda
@Archomeda
Feb 25 2017 00:00
but you don't even know if the k/d is from NA or both EU/NA?
EU is pretty much excluded, unless people /gg'd a million times since reset
i'll leave you to this, i mean i can keep talking but it's probably not gonna help solving the issue :(
sorry I'm staring at the screen trying to figure this out
there's definitely a pile of data with datacenter=0
but there's some that has non-zero data as well?
I'm not entirely sure why the actual output would be zeor
Archomeda
@Archomeda
Feb 25 2017 00:03
odd
Darrian
@rikkuness
Feb 25 2017 00:03
hey at least you're not the guy that made friendly AOE red ;D huehuehue
fair
you know what I'm actually just dumb as a rock
these are tracked per-map
you know which map has datacenter=0?
there's some other garbage going on here, the backend server is fine
Archomeda
@Archomeda
Feb 25 2017 00:04
eotm... i totally forgot about that map either
at least you excluded the backend server! :D
that's progress!
yeah
            {
                "v_shard": 1,
                "datacenter": 1,
                "map": 96,
                "shards": {
                    "red": 1017,
                    "blue": 1005,
                    "green": 1019
                },
                "deaths": {
                    "red": 1861,
                    "blue": 3412,
                    "green": 5176
                },
                "kills": {
                    "red": 1025,
                    "blue": 5814,
                    "green": 3220
                }
darthmaim
@darthmaim
Feb 25 2017 00:05
that looks better
not sure how the heck I screwed this up
Archomeda
@Archomeda
Feb 25 2017 00:06
so those million deaths of the red team in eotm is literally all the deaths combined across all the shards?
a million deaths is quite a lot now that i think about it
I think so yeah.
Darrian
@rikkuness
Feb 25 2017 00:07
those are all me ;p
Archomeda
@Archomeda
Feb 25 2017 00:07
lol
because the log reading component just separates by vshard/datacenter/map, and all EotM instances have the same 3-tuple
Archomeda
@Archomeda
Feb 25 2017 00:08
so basically eotm data is just garbage data that gets generated, but no one cares about
yeah but the log reading component doesn't know which map id is which -- it could technically ask but that's more coupling
so it just stores them all
Archomeda
@Archomeda
Feb 25 2017 00:08
fair
but @frodesigns, the k/d literally disappeared when you mentioned it?
I swear I saw it earlier
I was spot-checking the data after someone pointed out the zero shards
Archomeda
@Archomeda
Feb 25 2017 00:13
are the values reset every time? or are there some other accumulative shenanigans going on that has now caused an overflow somewhere?
they're uint32_ts so it's not overflow
anyway the issue is somewhere in the API frontend
and likely just recently introduced
oh
I know exactly what caused this
bloody hell
caches such
s/such/suck
there's some stupid in how wvw match data is currently cached
if I fix that it should clear itself up
(e.g., the memoized request that grabs the data for a matchup depends on the stats having been previously fetched)
the v1 impl that I pushed does this instead of fetching it:
        // Hurr.
        state.stats = {};
(but uses the same cache key, so there's a race condition)
I'll fix this in a bit
Archomeda
@Archomeda
Feb 25 2017 00:16
and... /v1 doesn't have k/d... right
also, since when can you fetch v1 endpoints without including .json?
uhh dunno
Jonathan Andrist
@rwfrk_twitter
Feb 25 2017 00:35
Race conditions are the bane of every programmer working in anything that deals with asynchronous stuff.
points at SAB ..see. not just WebDevelopment!
Also. Screw the statistics generation. Give people a raw output at the end of the week broken down by shard/map/skirmish#.
Get some rest. Murder things. You sound like you need it.
gonna fix this garbage before I leave
not gonna give my guildies more things to tease me about during raid
Archomeda
@Archomeda
Feb 25 2017 00:44
they wouldn't know..... right..?
ha ha ha
Archomeda
@Archomeda
Feb 25 2017 00:48

heh... my discord bot just went

[1:43 AM] BOTKormir: A new Guild Wars 2 build is available! Build 73,000.

that build number lol

Archomeda
@Archomeda
Feb 25 2017 01:17
ehh.... you might have seen a short request spike from me on /v2/build and the forum rss
just for 2 seconds or so :D
fair
I don't even monitor /v2/build FWIW
Archomeda
@Archomeda
Feb 25 2017 01:18
i changed something in my code and apparently the requests kept spawning
lol
Untitled.png
Archomeda
@Archomeda
Feb 25 2017 01:19
well, that is definitely not me haha
Darrian
@rikkuness
Feb 25 2017 01:19
oh duuuuude that is so fun
Archomeda
@Archomeda
Feb 25 2017 01:20
oh fuck

const timeout = this.config.guild_log_checker.timeout * 60 * 1000;

i changed the location of the config, and this was therefore 0

so i guess it was also the guild logs that i hit
oops
Darrian
@rikkuness
Feb 25 2017 01:21
xD
Brian Patrick
@frodesigns
Feb 25 2017 01:21
has anyone tried this server stats program? https://my-netdata.io/ recently put it on my server. pretty neat!
Archomeda
@Archomeda
Feb 25 2017 01:22
oh wow, that's pretty neat indeed
wait is this a drop-in munin replacement that isn't a nightmare
Darrian
@rikkuness
Feb 25 2017 01:23
pretty sexy, I sometimes use Cockpit if I want real time stuff, for longer term stuff influxDB and Grafana
Archomeda
@Archomeda
Feb 25 2017 01:23
munin stopped working for me for no apparent reason
munin was my bane for awhile
Darrian
@rikkuness
Feb 25 2017 01:24
oh man munin is some mad shit, that's RRD's right?
iirc yes
Archomeda
@Archomeda
Feb 25 2017 01:24
i had a power outage at some point, and munin stopped working after a reboot
everything else still works fine, and i can't fix munin
Darrian
@rikkuness
Feb 25 2017 01:24
I've been there, seen some reeeeealllly bad perl shit for managing those haha
Archomeda
@Archomeda
Feb 25 2017 01:24
i've reinstalled it many times XD
Darrian
@rikkuness
Feb 25 2017 01:25
my side project....
blob
Archomeda
@Archomeda
Feb 25 2017 01:25
chrome_2017-02-25_02-25-32.png
believe me, i've tried many times to fix this
@Archomeda rekt
Archomeda
@Archomeda
Feb 25 2017 01:26
also, why is munin still running, i thought i disabled that service a long time ago
Darrian
@rikkuness
Feb 25 2017 01:28
I'd super recommend influx though if you're just doing time based data stuff
wait, okay, so does netdata provide it's own non-hosted backend?
I guess influx+grafana is enough, I dunno
Archomeda
@Archomeda
Feb 25 2017 01:29
wait, wtf is this...
$ sudo service munin status
● munin.service
   Loaded: masked (/dev/null)
   Active: inactive (dead)
hmm
wait
i probably have nginx set up separately

⚰️

Archomeda
@Archomeda
Feb 25 2017 01:30
i can't remember how i did this
ah yes, i set it up with fastcgi
Brian Patrick
@frodesigns
Feb 25 2017 01:32
netdata was very easy and quick to install
Darrian
@rikkuness
Feb 25 2017 01:32
if you need GuildWars currency in grafana ever I got a branch still with that on xD http://imgur.com/a/glz25
I've still got an outstanding PR on Grafana actually to add holt winters pattern prediction stuff from influx
Archomeda
@Archomeda
Feb 25 2017 01:36

https://github.com/firehol/netdata/wiki/Installation#1-prepare-your-system

Try our experimental automatic requirements installer (no need to be root).

tries without root, fails installing apt packages because it's not run as root

Darrian
@rikkuness
Feb 25 2017 01:38
in theory you could containerise it and then map in the kernel capabilities and host pid mapping to "install" it that way
but then my answer to everything is "put it in a container"
Archomeda
@Archomeda
Feb 25 2017 01:38
i'm not smart enough to do that
if i have to put everything in containers, i'm going crazy
pfft
Darrian
@rikkuness
Feb 25 2017 01:40
people I have to work with -> https://cdn.meme.am/instances/61794237.jpg
$ ezjail-admin create graph-thingy 10.0.23.14
$ ezjail-admin start graph-thingy
$ ezjail-admin console graph-thinhy
graph-thingy$ pkg add net-data
docker pffftttt
install freebsd
Archomeda
@Archomeda
Feb 25 2017 01:40
some day i'll have to look into it
Darrian
@rikkuness
Feb 25 2017 01:40
oooh man I've not used freebsd since the military
Archomeda
@Archomeda
Feb 25 2017 01:40
i set up this system before i even knew about containers
lucky, they made us run an old version of centos
Archomeda
@Archomeda
Feb 25 2017 01:41
but hey, at least i'm not a person that runs everything under root haha
(well, we ran centos -- and told them it was rhel)
Archomeda
@Archomeda
Feb 25 2017 01:41
i do make separate users :P
Darrian
@rikkuness
Feb 25 2017 01:41
my day job until recently was supporting very old versions of centos :p
and rhel
i'm done with linux forever
FOREVER
freebsd or bust
Darrian
@rikkuness
Feb 25 2017 01:42
literally my car license plate says linux, I am a slave to the penguin
(he says from his macbook)
Brian Patrick
@frodesigns
Feb 25 2017 01:46
uh oh @lye. 15 mins til reset!
what will WvWers do without KDR to obsess over?
hey now EU has been handling it
I'm prepping the new shard merges in the API config now
Darrian
@rikkuness
Feb 25 2017 01:47
I've not actually logged in since reset, for all I know it's all on fire and my guild disbanded
hey it's been awhile since we had a friday after five live deploy
time to rev up the engines on this hype train
Brian Patrick
@frodesigns
Feb 25 2017 01:50
choo choo!
Darrian
@rikkuness
Feb 25 2017 01:51
out of interest, what's the most interesting thing anyone's created with use of the API data?
gw2e
also wvwintel
those are the two main things I use
Archomeda
@Archomeda
Feb 25 2017 01:51
oh my god
that config file is HUGE
Darrian
@rikkuness
Feb 25 2017 01:52
@queicherius is a bit of a legend, I'd hire him, especially now I've converted him to the ways of Docker'ing all the things ;D
hahah
Archomeda
@Archomeda
Feb 25 2017 01:52
no wonder why it said...
# Get config from http://127.0.0.1:19999/netdata.conf
Jonathan Andrist
@rwfrk_twitter
Feb 25 2017 01:53
http://www.wvwstats.com/na is something else I use from time to time..when things aren't on fire.
The timezone breakdown mostly.
Darrian
@rikkuness
Feb 25 2017 01:54
oh I'd not seen that one, that's really cool
that's some snazzy styling
MDL huh, I'll have to take a look at that later
Darrian
@rikkuness
Feb 25 2017 02:04
yah I thought it looked very material but didn't have the default google splash effect on the side nav haha
I've got bootstrap baked into my brain now though, I instinctively .col-md-4 things, change is hard
hmm okay so KDR is fixed for EU
the umm
matches aren't coming back up for NA yet
wonder what's up with that
okay they finally appeared
gonna blame incremental backoff for that one
and KDR's are appearing for NA matches now
Archomeda
@Archomeda
Feb 25 2017 02:09
:tada:
Darrian
@rikkuness
Feb 25 2017 02:09
beer o'clock
Archomeda
@Archomeda
Feb 25 2017 02:09
nice job!
oh fuck i botched it
one sec
Darrian
@rikkuness
Feb 25 2017 02:11
xD
Eearslya Sleiarion
@Eearslya
Feb 25 2017 02:12
we believe @lye
I think I got it right this time
once that config goes out I'll check it again and then :beers:'o'clock
Eearslya Sleiarion
@Eearslya
Feb 25 2017 02:16
:tada:
Darrian
@rikkuness
Feb 25 2017 02:17
it's 2am here, probably missed beer o'clock
David Reeß
@queicherius
Feb 25 2017 02:17
@rikkuness It's not working yet. Stupid loadbalancers.
eh it's noon somewhere
Darrian
@rikkuness
Feb 25 2017 02:17
you need a hand? I just dropped off Steam but you can tweeter me if ya need it
Archomeda
@Archomeda
Feb 25 2017 02:42
not just noon, high noon
Michael Dougall
@madou
Feb 25 2017 02:57
[10]
Archomeda
@Archomeda
Feb 25 2017 04:36
i just moved everything to letsencrypt, finally
i used custom signed certificates with cloudflare in front of it :P
i set that up before letsencrypt was a thing
couldn't care less to actually update it, but since i installed https://my-netdata.io/ after @frodesigns mentioned it, i thought why don't i do that right now
and disable some old subdomains lol
Eearslya Sleiarion
@Eearslya
Feb 25 2017 06:26
Good god, that's a lot of stats.
Brian Patrick
@frodesigns
Feb 25 2017 08:10
@lye Is /matches on a 5 minute cache now? I am seeing objective flips in bursts every 5 minutes instead of as they happen tonight.
Archomeda
@Archomeda
Feb 25 2017 10:08
Seems that someone broke something for p4f accounts https://www.reddit.com/r/guildwars2/comments/5w2mb2 :worried:
ChieftainAlex
@ChieftainAlex
Feb 25 2017 10:20
there is a certain humour to opening the wrong crafting url for gw2efficiency from browser history, and crafting the wrong item
of the theme "I deserved that".
darthmaim
@darthmaim
Feb 25 2017 10:57
looks like gems are working again :O
and #441 can be closed now
Darqam
@Darqam
Feb 25 2017 13:40
What's the sanity check to make sure the API is running? do you just ping V2 and see if it's not []?
darthmaim
@darthmaim
Feb 25 2017 13:40
I'm just checking in here :P
Darqam
@Darqam
Feb 25 2017 13:41
I'm not going to make my bot ask in gitter >.>
darthmaim
@darthmaim
Feb 25 2017 13:42
eh, you have to handle errors from the api for each request anyway and the API is up 99.99% of the time, you don't really need to check for that imho
Darqam
@Darqam
Feb 25 2017 13:43
... but that allows for batch checking in one line though... I get to be even more lazy
darthmaim
@darthmaim
Feb 25 2017 13:44
even when the api is up a request can fail (maybe just that one endpoint is broken, some network error, ...)
The only reason to check for that is for something like the banner on gw2efficiency to explain to users its not your fault and you can do nothing about it
Darqam
@Darqam
Feb 25 2017 13:44
sigh fine, I'll do it the longer and safer (and proper) way then
darthmaim
@darthmaim
Feb 25 2017 13:44
^:P
Archomeda
@Archomeda
Feb 25 2017 14:04
i tried to get a monstercat music bot working on discord
worked pretty nice
except that the bot is very primitive :(
David Reeß
@queicherius
Feb 25 2017 15:00
Looks like /guild/:id/teams is broken (again?), times out after 1 minute with 502, also other endpoints are really slow (3,8s for account, 2s for wallet, 1.7s for titles & skins, 1.5s for pvp stats, inventory, standings, outfits, materials, finishers etc for me atm)
Archomeda
@Archomeda
Feb 25 2017 15:57
repeat from earlier this week?
David Reeß
@queicherius
Feb 25 2017 15:58
earlier this week it was only the guild endpoint for me but everything else worked
Archomeda
@Archomeda
Feb 25 2017 16:11
well, i hope it's not the same as what @lye had to disable the api for
Darqam
@Darqam
Feb 25 2017 16:26
I'm also getting a few timeouts querying v2/achievements while testing stuff (this could be bad code on my end atm though)
Darqam
@Darqam
Feb 25 2017 17:15
@lye why is daily adventure pvp? https://api.guildwars2.com/v2/achievements/2915
yet in the daily section it is classified as a Pve (which it should imo)
Darrian
@rikkuness
Feb 25 2017 17:34
blob
the legend that is Rasman now has a daughter
Darqam
@Darqam
Feb 25 2017 18:03
is there no quick and dirty way to find one's total AP via the API? Or do you need to sum up the AP of all the achievements you have?
Archomeda
@Archomeda
Feb 25 2017 18:32
i think it's pretty much summing it
smiley
@codemasher
Feb 25 2017 19:29
blob
@rikkuness my glow is cooler :P
Darrian
@rikkuness
Feb 25 2017 19:31
oh man I need to pick Wildstar up again
smiley
@codemasher
Feb 25 2017 19:34
best game ever :D
there's a big update incoming next week
Darrian
@rikkuness
Feb 25 2017 19:47
I did really love it and the whole aesthetic was amazing, I just didn't have anyone to play with on there
smiley
@codemasher
Feb 25 2017 19:47
same ._.
gw2 was kinda similar - it broke up the whole gw1 community by splitting them into servers and not letting them play together. the fix came too late when the damage was already done...
nowadays i don't care anymore if i'm playing alone in gw1, wildstar or maybe sometimes even gw2
smiley
@codemasher
Feb 25 2017 19:52
gw1 has heroes, wildstar has tons of solo content... so.
idivait
@idivait
Feb 25 2017 20:45
Yeah, but if you want to play solo content... Why play an mmo? I mean, I also loved Wildstar. Just had some game-breaking flaws at launch and I just watched my friends leave 1 by 1 even though the PVE group content was some of the best mechanic design out there. And AMAZING housing.
windwarrior
@windwarrior
Feb 25 2017 20:47
yeah
playing an mmo for group content
smiley
@codemasher
Feb 25 2017 20:49

Yeah, but if you want to play solo content... Why play an mmo?

that's not the question

ChieftainAlex
@ChieftainAlex
Feb 25 2017 20:49
can someone link me to the changes made to v2/daily?
I always forget it has achievements/ on the front of that. nvm https://github.com/arenanet/api-cdi/blob/master/v2/achievements/daily.js
idivait
@idivait
Feb 25 2017 21:23
Course, I say that as I level gathering in BDO - Which I have literally never partied up in. So take that statement with a grain of salt lol.
Darqam
@Darqam
Feb 25 2017 22:55
@Archomeda You mentioned tracking the GW2 rss feed for a discord bot, would you mind showing that off a tiny bit to me?
Archomeda
@Archomeda
Feb 25 2017 22:56
err, let me see if i can make a short snippet
Darqam
@Darqam
Feb 25 2017 22:57
or even just a link to a git entry?
Archomeda
@Archomeda
Feb 25 2017 22:57
it's not on github yet :worried:
Darqam
@Darqam
Feb 25 2017 22:57
that would explain why I couldn't find it on your bot then >.>
I haven't worked with RSS before so I was just hoping for a starting point
Archomeda
@Archomeda
Feb 25 2017 22:59
const Promise = require('bluebird');
const Feedparser = require('feedparser');
const request = require('request');

const forumRss = 'https://forum-en.guildwars2.com/forum/info/updates.rss';

function checkReleaseNotes() {
    return readRss(forumRss).then(reader => {
        const latestThread = reader.read();
        return readRss(`${latestThread.link}.rss`);
    }).then(reader => {
        const allNotes = [];
        let notes;
        while (notes = reader.read()) {
            allNotes.push(notes);
        }

        return allNotes;
    });
}

function readRss(url) {
    return new Promise((resolve, reject) => {
        const r = request(url);
        const feed = new Feedparser();
        r.on('error', reject);
        r.on('response', function(res) {
            if (res.statusCode >= 200 && res.statusCode <= 299) {
                this.pipe(feed);
            } else {
                reject(new Error('Invalid status code ' + res.statusCode));
            }
        });
        feed.on('error', reject);
        let read = false;
        feed.on('readable', function() {
            if (!read) {
                resolve(this);
                read = true;
            }
        })
    });
}
might have screwed something up while cropping it, but this is the gist of the 2 functions that do stuff
Darqam
@Darqam
Feb 25 2017 23:01
this looks surprisingly similar to regular response queries
oh, and http://bluebirdjs.com as well
promises ftw
Darqam
@Darqam
Feb 25 2017 23:03
I really need to get comfortable with promises....
Archomeda
@Archomeda
Feb 25 2017 23:04
checkReleaseNotes().then(releaseNotes => {
    // releaseNotes contains all the posts in the latest release notes thread
});
you have to build logic to check against previous posts yourself
Darqam
@Darqam
Feb 25 2017 23:05
yeah, I think I get the basics of it, thanks
Archomeda
@Archomeda
Feb 25 2017 23:06
releaseNotes[i].link has the permanent URL, which pretty much http://forum-en.guildwars2.com/forum/info/updates/Game-Update-Notes-February-22-2017/6509077
don't forget that the first element is the most recent post
Darqam
@Darqam
Feb 25 2017 23:24
Realized I forgot to use "use strict" with that snippet... surprisingly did not forget that many declarations in all the stuff I already had.
Darqam
@Darqam
Feb 25 2017 23:47
I'm assuming the RSS feed has a built in limit on how many entries it has?
Archomeda
@Archomeda
Feb 25 2017 23:52
i dunno
maybe 10, maybe 15, maybe 20, maybe unlimited
rss spec doesn't mention it i think
Darqam
@Darqam
Feb 25 2017 23:53
I'm talking about the gw2 rss page
I think that only shows X amounts permanently?
Archomeda
@Archomeda
Feb 25 2017 23:54
yeah, i'm talking about it as well
doesn't prevent the forum from fetching all the threads/posts from the database
Darqam
@Darqam
Feb 25 2017 23:57
hum ok, so basically build whatever limit you want in the 'go back in history' portion of the code
Archomeda
@Archomeda
Feb 25 2017 23:58
i suppose
i wonder if there's a way to request history in rss
probably not