HashtagSell / posting-sync-agent

Synchronizes postings from 3taps with the #Sell Posting API
0 stars 0 forks source link

Omit Categories in ingest agent local.json #10

Closed that1guy closed 9 years ago

that1guy commented 9 years ago

Some categories (JJJJ, MMMM, PPPP) we don't need to ingest. Would be great if this could be configured in local.json. i.e.

{
  "logging": {
    "level": "trace"
  },
  "models": {
    "postings": {
      "schedule": {
        "interval": "every 30 secs"
      },
      "polling" : {
        "location": {
          "state": "USA-CA"
        }
      },
      "omitCategory" : {
        "parentCategory": [
          "PPPP",
          "MMMM"
        ],
        "childCategory": [
          "JJFS",
          "JJOT"
        ]
      }
    }
  },
  "services": {
    "3taps": {
      "apikey": "xxxxxxx"
    },
    "postings": {
      "url": "http://localhost:4043/v1/postings"
    }
  }
}
brozeph commented 9 years ago

Added this - but it's implemented in the models.postings.polling document as category_group with a value of ~PPPP|~MMMM. The models.postings.polling document is supplied to the 3taps driver as-is which makes this easy to achieve.

For omit category, the same thing can be accomplished by adding another config value for category using a similar pattern as above for omissions.

Are there any additional categories or category_groups I should configure for filtering?

that1guy commented 9 years ago

Ahh, gotcha. This makes sense.

For now, I say we just omit the "mature" group categories ~PPPP|~MMMM.

that1guy commented 9 years ago

Thanks Josh!