Pages: [1]

Recruitment System Upgrades!
Posts: 5 Views: 747

Wintermoot
  • Regional Stability Squad
  • The Greyscale Magi-Monk
  • Over the last few weeks, I've spent a lot of time upgrading the recruitment system. It's not the sexiest or busiest part of the website, but it remains important nonetheless because it's how we promote the region to new NationStates nations and bring many new faces and friends to our community! This is one of the first times an entire Wintreath system has been overhauled and announced as one giant update, and the improvements cover virtually everything involving recruitment. So what are these improvements, exactly?

    Better and more efficient use of the NationStates API
    In order to display NationStates nations on the recruitment list, we have to request that data from NationStates using the NationStates API, but the API limits requests to 50 every 30 seconds, which we previously sometimes ran into, resulting in NationStates refusing any more requests from us for 15 minutes. The Wintreath-NationStates API Driver, the piece of code that handles interactions between Wintreath scripts and the NSAPI, has been updated to keep track of the times recent requests were sent out and to not forward requests that would put us in danger of hitting that limit. It also logs all query requests and any errors received while trying to request data from NS, which will make it easier for me to troubleshoot future issues involving the API.

    More mobile friendly
    Yes, I've recruited on my phone before, lol. The page was originally designed for computer monitors, making for a stretched page on mobile. Now the boxes to the right hide themselves when on lower-resolution screens, leaving the box with your telegram template code and stats (a new feature that quickly shows where you stand in daily, monthly, and overall recruitment! If for some reason you want to see the rank lists while on mobile, you just have to click the links in this box to display them and hide them again!

    The Recruitment Page on Mobile

    Clean, Secure, and Efficient Code
    The recruitment system was originally built in 2014 and then massively expanded in 2015 to take into account other nation stats and to track nations over time to collect stats that we've occasionally shared out. In the process, the recruitment system code became some of the largest and messiest codes on the website. I went over the code with a fine-tooth comb, reducing its size from 650 to 440 lines, replacing outdated code, and making sure any inputs that entered the script were handled as securely as possible.

    API Recruitment Included
    Perhaps the biggest change is that we're now also recruiting using the NS API through the website! We used to use NS++, but it's become less than reliable...now, our API recruitment will tie into the rest of the system. For example, it won't send telegrams to nations that our records show have blocked recruitment telegrams. Nations recruited through the API will still show up for manual recruitment, because using multiple recruitment methods improves the odds that a nation will receive one of the messages.

    In the end, these updates should enhance our recruitment ability and make it easier for recruiters to share what we're about to other people looking for a regional home. Please feel free to suggest improvements or ideas for the future, and stay tuned for future updates cause we're always improving. :)
    3 people like this post: taulover, Gerrick, Imaginative Kane


    I went all the way to Cassadega to commune with the dead
    They said "You'd better look alive"
    Wintermoot
    • The Greyscale Magi-Monk
    • Posts: 19,525
    • Karma: 9,733
    • Weather: ❄️
    • Regional Stability Squad
    • Pronouns
      He/Him/His
      Orientation
      Demisexual
      Wintreath Nation
      Logged
    taulover
  • Regional Stability Squad
  • Seeker of Knowledge
  • So does the automated API recruitment now take place through a script on our website, then? Sounds cool!
    Résumé
    taulover
    • Seeker of Knowledge
    • Posts: 13,244
    • Karma: 4,263
    • Regional Stability Squad
    • Pronouns
      He/Him/His
      Familial House
      Valeria
      Wintreath Nation
      Logged
    Wintermoot
  • Regional Stability Squad
  • The Greyscale Magi-Monk
  • So does the automated API recruitment now take place through a script on our website, then? Sounds cool!
    Yes! I expect the API portion to be able to send out 200-300 telegrams a day based on what it's ran so far, in addition to our manual recruitment.
    1 person likes this post: taulover


    I went all the way to Cassadega to commune with the dead
    They said "You'd better look alive"
    Wintermoot
    • The Greyscale Magi-Monk
    • Posts: 19,525
    • Karma: 9,733
    • Weather: ❄️
    • Regional Stability Squad
    • Pronouns
      He/Him/His
      Orientation
      Demisexual
      Wintreath Nation
      Logged
    taulover
  • Regional Stability Squad
  • Seeker of Knowledge
  • So does the automated API recruitment now take place through a script on our website, then? Sounds cool!
    Yes! I expect the API portion to be able to send out 200-300 telegrams a day based on what it's ran so far, in addition to our manual recruitment.
    Wait, but isn't the API ratelimit 3 minutes? That should be 480 telegrams a day... Or are you not counting blocked TGs and stuff like that?
    Résumé
    taulover
    • Seeker of Knowledge
    • Posts: 13,244
    • Karma: 4,263
    • Regional Stability Squad
    • Pronouns
      He/Him/His
      Familial House
      Valeria
      Wintreath Nation
      Logged
    Wintermoot
  • Regional Stability Squad
  • The Greyscale Magi-Monk
  • Wait, but isn't the API ratelimit 3 minutes? That should be 480 telegrams a day... Or are you not counting blocked TGs and stuff like that?
    Because HostGator doesn't allow cron jobs to run faster than every 15 minutes, I had to be a bit imaginative in how to trigger the code more often. That being said, 200-300 telegrams is probably a conservative estimate.
    1 person likes this post: taulover


    I went all the way to Cassadega to commune with the dead
    They said "You'd better look alive"
    Wintermoot
    • The Greyscale Magi-Monk
    • Posts: 19,525
    • Karma: 9,733
    • Weather: ❄️
    • Regional Stability Squad
    • Pronouns
      He/Him/His
      Orientation
      Demisexual
      Wintreath Nation
      Logged
     
    Pages: [1]