Skip to content

Instantly share code, notes, and snippets.

View pranavkulkarni's full-sized avatar

Pranav Kulkarni pranavkulkarni

  • Esri
View GitHub Profile
@pranavkulkarni
pranavkulkarni / compose-scenarios.js
Created September 14, 2017 17:26
Compose scenarios
// 1. fetchItem failed
[
{
errors: [
{
message:
'400 GWM_0001 Specified output format not supported. http://www.arcgis.com/sharing/rest/content/ite/0c5c72721ac049b98d9f4c27a4877254?f=json',
url:
'http://www.arcgis.com/sharing/rest/content/ite/0c5c72721ac049b98d9f4c27a4877254?f=json',
statusCode: 400,
@pranavkulkarni
pranavkulkarni / the-duke-compose-step-fail-example-2.js
Created September 13, 2017 17:12
Fetch HTTP error in compose step: the-duke-compose-step-fail-example-2
{
"composeStatus": {
"pass": false,
"erroneousFields": {
"item": {
"state": "rejected",
"reason": {
"message": "400 CONT_0001 Item does not exist or is inaccessible. http://www.arcgis.com/sharing/rest/content/items/fd1e856ba4f74cb5bc04e54e3fdf9e76?f=json",
"url": "http://www.arcgis.com/sharing/rest/content/items/fd1e856ba4f74cb5bc04e54e3fdf9e76?f=json",
"statusCode": 400
@pranavkulkarni
pranavkulkarni / the-duke-compose-step-fail-example-1.js
Last active September 13, 2017 17:11
Node native error in compose step: the-duke-compose-step-fail-example-1
{
"composeStatus": {
"pass": false,
"erroneousFields": {
"layers": {
"state": "rejected",
"reason": {
"name": "FetchError",
"message": "invalid json response body at https://www.fws.gov/wetlands/arcgis/services/Wetlands/MapServer/WMSServer/layers?f=json reason: Unexpected token < in JSON at position 0",
"type": "invalid-json"
{ id: 'b833bf971f5147a4903f95433a618c51_2',
owner: 'suba_dev',
orgId: 'fEmgGq7yFGAFozS4',
created: 1432848313000,
modified: 1432848510000,
guid: null,
name: 'StateEdit',
title: 'StateEdit',
type: 'Feature Service',
typeKeywords:
@pranavkulkarni
pranavkulkarni / job-content.json
Last active August 14, 2017 17:50
Sample job content received by worker from RabbitMQ
{
"id": "94ac5cc0-80fb-11e7-a2b2-3f679765d1f6",
"name": "validate",
"data": {
"jobName": "record-count",
"jobType": "validate",
"layerId": "d881574cc37a457c895bc98e92a7cdf3_0",
"datasetId": "d881574cc37a457c895bc98e92a7cdf3",
"jobOptions": {
"startIn": 10,
@pranavkulkarni
pranavkulkarni / enrich-worker-log
Created August 9, 2017 16:50
enrich-worker-log
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 364 100 364 0 0 47556 0 --:--:-- --:--:-- --:--:-- 52000
{
"name" : "Marvel Boy",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "lNfnFtt_TB24wbC7HFaMrg",
"version" : {
"number" : "2.4.5",
"build_hash" : "c849dd13904f53e63e88efc33b2ceeda0b6a1276",
@pranavkulkarni
pranavkulkarni / scheduler.log
Created August 9, 2017 16:48
Scheduler logs
psql: could not connect to server: Connection refused
Is the server running on host "pg" (172.18.0.2) and accepting
TCP/IP connections on port 5432?
DB not ready waiting 10 seconds
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+------------+------------+-----------------------
postgres | postgres | UTF8 | en_US.utf8 | en_US.utf8 |
template0 | postgres | UTF8 | en_US.utf8 | en_US.utf8 | =c/postgres +
| | | | | postgres=CTc/postgres
@pranavkulkarni
pranavkulkarni / composer-jobs
Created August 11, 2016 20:45
Config changes in opendata-docker repo for topic modeling - docker compose file and files in environment folder
CJ_REDIS_HOST=redis
CJ_REDIS_PORT=6379
CJ_REDIS_PASSWORD=
CJ_REDIS_RESQUE_DB=0
CJ_REDIS_RESQUE_NAMESPACE=composer-jobs
CJ_AGO_BASE_URL=https://www.arcgis.com
CJ_AGO_GEOMETRY_SERVICE_URL=http://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer
CJ_OPENDATA_KOOP_URL=http://opendata.arcgis.com
CJ_API_URL=http://composer-jobs-api
CJ_API_EXPRESS_PORT=80