| a | b | |
|---|
| 0 | + | [Tue, 17 Apr 2012 06:02:54 GMT] [info] [<0.32016.573>] 71.19.150.86 - - GET /mygpo/_design/users/_view/episode_states_by_user_episode?include_docs=true&limit=1&key=%5B%2219d601e09560c3096c857dc97833abd9%22%2C+%229be5b4638392f1e21880e266d4da2845%22%5D 200 |
|---|
| 0 | + | [Tue, 17 Apr 2012 06:02:54 GMT] [error] [<0.11806.548>] Duplicates of document `8c40fc1a160920a958b95e8d111aabb0` detected in view group `_design/users`, database `mygpo` - view rebuild, from scratch, is required |
|---|
| 0 | + | [Tue, 17 Apr 2012 06:02:54 GMT] [error] [<0.11804.548>] ** Generic server <0.11804.548> terminating |
|---|
| 0 | + | ** Last message in was {'EXIT',<0.11806.548>, |
|---|
| 0 | + | {view_duplicated_id, |
|---|
| 0 | + | <<"8c40fc1a160920a958b95e8d111aabb0">>}} |
|---|
| 0 | + | ** When Server state == {file, |
|---|
| 0 | + | {file_descriptor,prim_file,{#Port<0.10242013>,70}}, |
|---|
| 0 | + | 4944417161} |
|---|
| 0 | + | ** Reason for termination == |
|---|
| 0 | + | ** {view_duplicated_id,<<"8c40fc1a160920a958b95e8d111aabb0">>} |
|---|
| 0 | + | |
|---|
| 0 | + | [Tue, 17 Apr 2012 06:02:54 GMT] [error] [<0.11804.548>] {error_report,<0.31.0>, |
|---|
| 0 | + | {<0.11804.548>,crash_report, |
|---|
| 0 | + | [[{initial_call,{couch_file,init,['Argument__1']}}, |
|---|
| 0 | + | {pid,<0.11804.548>}, |
|---|
| 0 | + | {registered_name,[]}, |
|---|
| 0 | + | {error_info, |
|---|
| 0 | + | {exit, |
|---|
| 0 | + | {view_duplicated_id, |
|---|
| 0 | + | <<"8c40fc1a160920a958b95e8d111aabb0">>}, |
|---|
| 0 | + | [{gen_server,terminate,6}, |
|---|
| 0 | + | {proc_lib,init_p_do_apply,3}]}}, |
|---|
| 0 | + | {ancestors,[<0.164.0>,<0.163.0>]}, |
|---|
| 0 | + | {messages,[]}, |
|---|
| 0 | + | {links,[]}, |
|---|
| 0 | + | {dictionary,[]}, |
|---|
| 0 | + | {trap_exit,true}, |
|---|
| 0 | + | {status,running}, |
|---|
| 0 | + | {heap_size,610}, |
|---|
| 0 | + | {stack_size,24}, |
|---|
| 0 | + | {reductions,813809184}], |
|---|
| 0 | + | []]}} |
|---|
| 0 | + | [Tue, 17 Apr 2012 06:02:54 GMT] [info] [<0.31996.573>] 71.19.150.86 - - GET /mygpo/_design/users/_view/episode_states_by_ref_urls?include_docs=true&limit=1&key=%5B%22123648da92647ac2a6aa6779295bc040%22%2C+%22http%3A%2F%2Fwww.cbc.ca%2Fpodcasting%2Fincludes%2Fspark.xml%22%2C+%22http%3A%2F%2Fpodcast.cbc.ca%2Fmp3%2Fpodcasts%2Fspark_20100613_33816.mp3%22%5D 200 |
|---|
| 0 | + | [Tue, 17 Apr 2012 06:02:54 GMT] [error] [<0.164.0>] ** Generic server <0.164.0> terminating |
|---|
| 0 | + | ** Last message in was {'EXIT',<0.11806.548>, |
|---|
| 0 | + | {view_duplicated_id, |
|---|
| 0 | + | <<"8c40fc1a160920a958b95e8d111aabb0">>}} |
|---|
| 0 | + | ** When Server state == {group_state,undefined,<<"mygpo">>, |
|---|
| 0 | + | {"/var/lib/couchdb",<<"mygpo">>, |
|---|
| 0 | + | {group, |
|---|
| 0 | + | <<53,2,238,250,177,14,34,184,223,68,148,80,27,54,51, |
|---|
| 0 | + | 55>>, |
|---|
| 0 | + | nil,<<"_design/users">>,<<"javascript">>,[], |
|---|
| 0 | + | [{view,0,0,0, |
|---|
| 0 | + | [<<"history">>], |
|---|
| 0 | + | <<"function(doc)\n{\n function processEpisodeAction(action)\n {\n action_obj = {\n type: \"Episode\",\n podcast_url: doc.podcast_ref_url,\n episode_url: doc.ref_url,\n podcast_id: doc.podcast,\n episode_id: doc.episode,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n }\n\n if(action.device != null)\n {\n action_obj[\"device_id\"] = action.device;\n }\n if(action.started != null)\n {\n action_obj[\"started\"] = action.started;\n }\n if(action.playmark != null)\n {\n action_obj[\"position\"] = action.playmark;\n }\n if(action.total != null)\n {\n action_obj[\"total\"] = action.total;\n }\n\n emit([doc.user, action_obj.timestamp], action_obj);\n }\n\n function processSubscriptionAction(action)\n {\n action_obj = {\n type: \"Subscription\",\n podcast_url: doc.ref_url,\n podcast_id: doc.podcast,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n device_id: action.device,\n }\n\n emit([doc.user, action_obj.timestamp], action_obj);\n }\n\n\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n in doc.actions)\n {\n processEpisodeAction(doc.actions[n]);\n }\n }\n if(doc.doc_type == \"PodcastUserState\")\n {\n for(var n in doc.actions)\n {\n processSubscriptionAction(doc.actions[n]);\n }\n }\n}">>, |
|---|
| 0 | + | nil,[],[]}, |
|---|
| 0 | + | {view,1,0,0, |
|---|
| 0 | + | [<<"device_history">>], |
|---|
| 0 | + | <<"function(doc)\n{\n function processEpisodeAction(action)\n {\n if(action.device == null)\n {\n return;\n }\n\n action_obj = {\n type: \"Episode\",\n podcast_url: doc.podcast_ref_url,\n episode_url: doc.ref_url,\n podcast_id: doc.podcast,\n episode_id: doc.episode,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n }\n\n if(action.device != null)\n {\n action_obj[\"device_id\"] = action.device;\n }\n if(action.started != null)\n {\n action_obj[\"started\"] = action.started;\n }\n if(action.playmark != null)\n {\n action_obj[\"position\"] = action.playmark;\n }\n if(action.total != null)\n {\n action_obj[\"total\"] = action.total;\n }\n\n emit([doc.user, action.device, action_obj.timestamp], action_obj);\n }\n\n function processSubscriptionAction(action)\n {\n action_obj = {\n type: \"Subscription\",\n podcast_url: doc.ref_url,\n podcast_id: doc.podcast,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n device_id: action.device,\n }\n\n emit([doc.user, action.device, action_obj.timestamp], action_obj);\n }\n\n\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n in doc.actions)\n {\n processEpisodeAction(doc.actions[n]);\n }\n }\n if(doc.doc_type == \"PodcastUserState\")\n {\n for(var n in doc.actions)\n {\n processSubscriptionAction(doc.actions[n]);\n }\n }\n}">>, |
|---|
| 0 | + | nil,[],[]}, |
|---|
| 0 | + | {view,2,0,0, |
|---|
| 0 | + | [<<"episode_states_by_podcast_episode">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n emit([doc.podcast, doc.episode, doc.user], null);\n }\n}">>, |
|---|
| 0 | + | nil,[],[]}, |
|---|
| 0 | + | {view,3,0,0, |
|---|
| 0 | + | [<<"episode_states_by_user_episode">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n emit([doc.user, doc.episode], null);\n }\n}">>, |
|---|
| 0 | + | nil,[],[]}, |
|---|
| 0 | + | {view,4,0,0, |
|---|
| 0 | + | [<<"episode_states_by_ref_urls">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n emit([doc.user, doc.podcast_ref_url, doc.ref_url], null);\n }\n}">>, |
|---|
| 0 | + | nil,[],[]}, |
|---|
| 0 | + | {view,5,0,0, |
|---|
| 0 | + | [<<"episode_actions_podcast_device">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n in doc.actions)\n {\n action = doc.actions[n];\n\n action_obj = {\n podcast: doc.podcast_ref_url,\n episode: doc.ref_url,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n }\n\n if(action.device != null)\n {\n action_obj[\"device_id\"] = action.device;\n }\n if(action.started != null)\n {\n action_obj[\"started\"] = action.started;\n }\n if(action.playmark != null)\n {\n action_obj[\"position\"] = action.playmark;\n }\n if(action.total != null)\n {\n action_obj[\"total\"] = action.total;\n }\n\n\n emit([\n doc.user,\n doc.podcast,\n action.device,\n action_obj.timestamp,\n ], action_obj\n );\n }\n }\n}">>, |
|---|
| 0 | + | nil,[],[]}, |
|---|
| 0 | + | {view,6,0,0, |
|---|
| 0 | + | [<<"episode_actions_device">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n in doc.actions)\n {\n action = doc.actions[n];\n\n action_obj = {\n podcast: doc.podcast_ref_url,\n episode: doc.ref_url,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n }\n\n if(action.device != null)\n {\n action_obj[\"device_id\"] = action.device;\n }\n if(action.started != null)\n {\n action_obj[\"started\"] = action.started;\n }\n if(action.playmark != null)\n {\n action_obj[\"position\"] = action.playmark;\n }\n if(action.total != null)\n {\n action_obj[\"total\"] = action.total;\n }\n\n emit([\n doc.user,\n action.device,\n action_obj.timestamp,\n ], action_obj\n );\n }\n }\n}">>, |
|---|
| 0 | + | nil,[],[]}, |
|---|
| 0 | + | {view,7,0,0, |
|---|
| 0 | + | [<<"episode_actions">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n in doc.actions)\n {\n action = doc.actions[n];\n\n action_obj = {\n podcast: doc.podcast_ref_url,\n episode: doc.ref_url,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n }\n\n if(action.device != null)\n {\n action_obj[\"device_id\"] = action.device;\n }\n if(action.started != null)\n {\n action_obj[\"started\"] = action.started;\n }\n if(action.playmark != null)\n {\n action_obj[\"position\"] = action.playmark;\n }\n if(action.total != null)\n {\n action_obj[\"total\"] = action.total;\n }\n\n emit([\n doc.user,\n action_obj.timestamp\n ], action_obj\n );\n }\n }\n}">>, |
|---|
| 0 | + | nil,[],[]}, |
|---|
| 0 | + | {view,8,0,0, |
|---|
| 0 | + | [<<"episode_actions_podcast">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n in doc.actions)\n {\n action = doc.actions[n];\n\n action_obj = {\n podcast: doc.podcast_ref_url,\n episode: doc.ref_url,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n }\n\n if(action.device != null)\n {\n action_obj[\"device_id\"] = action.device;\n }\n if(action.started != null)\n {\n action_obj[\"started\"] = action.started;\n }\n if(action.playmark != null)\n {\n action_obj[\"position\"] = action.playmark;\n }\n if(action.total != null)\n {\n action_obj[\"total\"] = action.total;\n }\n\n emit([\n doc.user,\n doc.podcast,\n action_obj.timestamp\n ], action_obj\n );\n }\n }\n}">>, |
|---|
| 0 | + | nil,[],[]}, |
|---|
| 0 | + | {view,9,0,0, |
|---|
| 0 | + | [<<"chapters_by_episode">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n in doc.chapters)\n {\n var chapter = doc.chapters[n];\n emit([doc.episode, doc.user], chapter);\n }\n }\n}">>, |
|---|
| 0 | + | nil,[],[]}, |
|---|
| 0 | + | {view,10,0,0,[], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n=doc.actions.length-1; n>=0; n--)\n {\n var action = doc.actions[n];\n if(action.action == \"play\")\n {\n var day = action.timestamp.slice(0, 10);\n emit([doc.episode, day], doc.user);\n return;\n }\n }\n }\n}">>, |
|---|
| 0 | + | nil, |
|---|
| 0 | + | [{<<"listeners_by_episode">>,<<"_count">>}], |
|---|
| 0 | + | []}, |
|---|
| 0 | + | {view,11,0,0,[], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n=doc.actions.length-1; n>=0; n--)\n {\n var action = doc.actions[n];\n if(action.action == \"play\")\n {\n var day = action.timestamp.slice(0, 10);\n emit([doc.podcast, day], doc.user);\n return;\n }\n }\n }\n}">>, |
|---|
| 0 | + | nil, |
|---|
| 0 | + | [{<<"listeners_by_podcast">>, |
|---|
| 0 | + | <<"function (keys, values, rereduce)\n{\n function unique(arr) {\n var a = [];\n var l = arr.length;\n for(var i=0; i<l; i++) {\n for(var j=i+1; j<l; j++) {\n if (arr[i] === arr[j])\n j = ++i;\n }\n a.push(arr[i]);\n }\n return a;\n };\n\n if (rereduce)\n {\n return sum(values)\n }\n {\n /* We count one per user, not per play-event */\n val = unique(values);\n return val.length;\n }\n}">>}], |
|---|
| 0 | + | []}, |
|---|
| 0 | + | {view,12,0,0,[], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n=doc.actions.length-1; n>=0; n--)\n {\n var action = doc.actions[n];\n if(action.action == \"play\")\n {\n var day = action.timestamp.slice(0, 10);\n emit([doc.podcast, doc.episode, day], doc.user);\n return;\n }\n }\n }\n}">>, |
|---|
| 0 | + | nil, |
|---|
| 0 | + | [{<<"listeners_by_podcast_episode">>, |
|---|
| 0 | + | <<"function (keys, values, rereduce)\n{\n function unique(arr) {\n var a = [];\n var l = arr.length;\n for(var i=0; i<l; i++) {\n for(var j=i+1; j<l; j++) {\n if (arr[i] === arr[j])\n j = ++i;\n }\n a.push(arr[i]);\n }\n return a;\n };\n\n if (rereduce)\n {\n return sum(values)\n }\n {\n /* We count one per user, not per play-event */\n val = unique(values);\n return val.length;\n }\n}">>}], |
|---|
| 0 | + | []}, |
|---|
| 0 | + | {view,13,0,0,[], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n if(doc.actions == null || doc.actions.length == 0)\n {\n return;\n }\n\n function sortByStarted(a, b)\n {\n var x = a.started;\n var y = b.started;\n return ((x < y) ? -1 : ((x > y) ? 1 : 0));\n }\n\n function hasTimeValues(action)\n {\n return ((action != null) && (action.started != null) && (action.playmark != null));\n }\n\n var actions = doc.actions.slice(0); // creates a copy\n actions = actions.filter(hasTimeValues);\n actions.sort(sortByStarted);\n\n var played_parts = [];\n var flat_date = null;\n\n for(var n in actions)\n {\n var action = actions[n];\n\n if(flat_date == null)\n {\n flat_date = {start: action.started, end: action.playmark};\n played_parts.push(flat_date);\n continue;\n }\n\n if(action.started <= flat_date.end && action.playmark >= flat_date.end)\n {\n flat_date.end = action.playmark;\n }\n else if(action.started >= flat_date.start && action.playmark <= flat_date.end)\n {\n // part already contained\n continue;\n }\n else\n {\n flat_date = {start: action.started, end: action.playmark};\n played_parts.push(flat_date);\n }\n }\n\n if (played_parts.length == 0)\n {\n return;\n }\n\n var sections = [];\n for(var n in played_parts)\n {\n var part = played_parts[n];\n sections.push(part.start);\n sections.push(part.end);\n }\n\n emit([doc.podcast, doc.episode, doc.user], sections);\n }\n}">>, |
|---|
| 0 | + | nil, |
|---|
| 0 | + | [{<<"episode_heatmap">>, |
|---|
| 0 | + | <<"function (keys, values, rereduce)\n{\n function unique(arr) {\n var a = [];\n var l = arr.length;\n for(var i=0; i<l; i++) {\n for(var j=i+1; j<l; j++) {\n if (arr[i] === arr[j])\n j = ++i;\n }\n a.push(arr[i]);\n }\n return a;\n };\n\n function flatten(arr)\n {\n var flattened = []\n for(var n in arr)\n {\n for(var x in arr[n])\n {\n flattened.push(arr[n][x]);\n }\n }\n return flattened\n };\n\n function sortNumerical(a, b)\n {\n if(a < b)\n {\n return -1;\n }\n else if (a > b)\n {\n return 1;\n }\n else\n {\n return 0;\n }\n };\n\n function mergeBorders(borders, maxBorders)\n {\n last = null;\n newBorders = [];\n\n lastBorder = borders[borders.length-1];\n minDist = lastBorder / maxBorders;\n\n for(var n in borders)\n {\n border = borders[n];\n\n if(last == null)\n {\n }\n else if (border == lastBorder)\n {\n }\n else if ((border - last) < minDist)\n {\n continue;\n }\n\n newBorders.push(border);\n last = border;\n }\n\n return newBorders;\n };\n\n var all_borders = [];\n\n if (rereduce)\n {\n for(var n in values)\n {\n all_borders.push(values[n].borders);\n }\n }\n else\n {\n all_borders = values;\n }\n\n var borders = flatten(all_borders);\n borders = unique(borders);\n borders.sort(sortNumerical);\n borders = mergeBorders(borders, 50);\n\n var heatmap = [];\n\n for(var n=0; n<borders.length-1; n++)\n {\n heatmap.push(0);\n }\n\n for(var n in values)\n {\n j = 0;\n var length = 0;\n var increment = 1;\n\n if(rereduce)\n {\n length = values[n].borders.length-1;\n increment = 1;\n }\n else\n {\n length = values[n].length;\n increment = 2;\n }\n\n\n for(var i=0; i<length; i+=increment)\n {\n var from = 0;\n var until = 0;\n\n if(rereduce)\n {\n from = values[n].borders[i];\n until = values[n].borders[i+1];\n }\n else\n {\n from = values[n][i];\n until = values[n][i+1];\n }\n\n while(borders[j] < from)\n {\n j++;\n }\n\n while(borders[j] < until)\n {\n if(rereduce)\n {\n heatmap[j++] += values[n].heatmap[i];\n }\n else\n {\n heatmap[j++] += 1;\n }\n }\n }\n }\n\n return {heatmap: heatmap, borders: borders};\n}">>}], |
|---|
| 0 | + | []}, |
|---|
| 0 | + | {view,14,0,0, |
|---|
| 0 | + | [<<"episode_states">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n if(doc.actions.length < 1)\n {\n return;\n }\n\n action = doc.actions[doc.actions.length-1];\n\n action_obj = {\n podcast_url: doc.podcast_ref_url,\n episode_url: doc.ref_url,\n podcast_id: doc.podcast,\n episode_id: doc.episode,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n }\n\n if(action.device != null)\n {\n action_obj[\"device_id\"] = action.device;\n }\n if(action.started != null)\n {\n action_obj[\"started\"] = action.started;\n }\n if(action.playmark != null)\n {\n action_obj[\"position\"] = action.playmark;\n }\n if(action.total != null)\n {\n action_obj[\"total\"] = action.total;\n }\n\n\n emit([doc.user, doc.podcast, doc.episode], action_obj);\n }\n}">>, |
|---|
| 0 | + | nil,[],[]}, |
|---|
| 0 | + | {view,15,0,0, |
|---|
| 0 | + | [<<"podcast_states_by_podcast">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"PodcastUserState\")\n {\n emit([doc.podcast, doc.user], null);\n }\n}">>, |
|---|
| 0 | + | nil,[],[]}, |
|---|
| 0 | + | {view,16,0,0, |
|---|
| 0 | + | [<<"podcast_states_by_user">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"PodcastUserState\")\n {\n emit([doc.user, doc.podcast], null);\n }\n}">>, |
|---|
| 0 | + | nil,[],[]}, |
|---|
| 0 | + | {view,17,0,0, |
|---|
| 0 | + | [<<"podcast_states_by_device">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"PodcastUserState\")\n {\n var affected_devices = [];\n\n for(var n in doc.actions)\n {\n var action = doc.actions[n];\n if (affected_devices.indexOf(action.device) == -1)\n {\n affected_devices.push(action.device);\n }\n }\n\n for(var n in affected_devices)\n {\n var device = affected_devices[n];\n\n emit([device, doc.podcast], null);\n }\n }\n}">>, |
|---|
| 0 | + | nil,[],[]}, |
|---|
| 0 | + | {view,18,0,0,[], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"PodcastUserState\")\n {\n var subscribed_devices = [];\n\n for(var n in doc.actions)\n {\n var action = doc.actions[n];\n\n if(action.action == \"subscribe\")\n {\n subscribed_devices.push(action.device);\n }\n else\n {\n var index = subscribed_devices.indexOf(action.device);\n subscribed_devices.splice(index, 1);\n }\n }\n\n for(var n in subscribed_devices)\n {\n var device = subscribed_devices[n];\n\n if(doc.disabled_devices && (doc.disabled_devices.indexOf(device) > -1))\n {\n continue;\n }\n\n\n if(doc.settings == null || doc.settings.public_subscription == null)\n {\n var is_public = true;\n }\n else\n {\n var is_public = doc.settings.public_subscription;\n }\n\n emit([doc.user, is_public, doc.podcast, device], null);\n }\n }\n}">>, |
|---|
| 0 | + | nil, |
|---|
| 0 | + | [{<<"subscribed_podcasts_by_user">>, |
|---|
| 0 | + | <<"_count">>}], |
|---|
| 0 | + | []}, |
|---|
| 0 | + | {view,19,0,0, |
|---|
| 0 | + | [<<"subscribed_podcasts_by_device">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"PodcastUserState\")\n {\n var subscribed_devices = [];\n\n for(var n in doc.actions)\n {\n var action = doc.actions[n];\n\n if(action.action == \"subscribe\")\n {\n subscribed_devices.push(action.device);\n }\n else\n {\n var index = subscribed_devices.indexOf(action.device);\n subscribed_devices.splice(index, 1);\n }\n }\n\n for(var n in subscribed_devices)\n {\n var device = subscribed_devices[n];\n\n if(doc.disabled_devices && (doc.disabled_devices.indexOf(device) > -1))\n {\n continue;\n }\n\n emit([device, doc.podcast], null);\n }\n }\n}">>, |
|---|
| 0 | + | nil,[],[]}, |
|---|
| 0 | + | {view,20,0,0,[], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"PodcastUserState\")\n {\n var subscribed_devices = [];\n\n for(var n in doc.actions)\n {\n var action = doc.actions[n];\n\n if(action.action == \"subscribe\")\n {\n subscribed_devices.push(action.device);\n }\n else\n {\n var index = subscribed_devices.indexOf(action.device);\n subscribed_devices.splice(index, 1);\n }\n }\n\n for(var n in subscribed_devices)\n {\n var device = subscribed_devices[n];\n\n if(doc.disabled_devices && (doc.disabled_devices.indexOf(device) > -1))\n {\n continue;\n }\n\n emit([doc.podcast, doc.user, device], null);\n }\n }\n}">>, |
|---|
| 0 | + | nil, |
|---|
| 0 | + | [{<<"subscriptions_by_podcast">>,<<"_count">>}], |
|---|
| 0 | + | []}, |
|---|
| 0 | + | {view,21,0,0, |
|---|
| 0 | + | [<<"suggestions_by_user">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"Suggestions\")\n {\n emit(doc.user, null);\n }\n}">>, |
|---|
| 0 | + | nil,[],[]}, |
|---|
| 0 | + | {view,22,0,0, |
|---|
| 0 | + | [<<"favorite_episodes_by_user">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == 'EpisodeUserState')\n {\n if (doc.settings && doc.settings.is_favorite)\n {\n emit(doc.user, {_id: doc.episode});\n }\n }\n}">>, |
|---|
| 0 | + | nil,[],[]}], |
|---|
| 0 | + | {[]}, |
|---|
| 0 | + | nil,0,0,nil,nil}}, |
|---|
| 0 | + | {group, |
|---|
| 0 | + | <<53,2,238,250,177,14,34,184,223,68,148,80,27,54,51, |
|---|
| 0 | + | 55>>, |
|---|
| 0 | + | <0.165.0>,<<"_design/users">>,<<"javascript">>,[], |
|---|
| 0 | + | [{view,0,154765697,0, |
|---|
| 0 | + | [<<"history">>], |
|---|
| 0 | + | <<"function(doc)\n{\n function processEpisodeAction(action)\n {\n action_obj = {\n type: \"Episode\",\n podcast_url: doc.podcast_ref_url,\n episode_url: doc.ref_url,\n podcast_id: doc.podcast,\n episode_id: doc.episode,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n }\n\n if(action.device != null)\n {\n action_obj[\"device_id\"] = action.device;\n }\n if(action.started != null)\n {\n action_obj[\"started\"] = action.started;\n }\n if(action.playmark != null)\n {\n action_obj[\"position\"] = action.playmark;\n }\n if(action.total != null)\n {\n action_obj[\"total\"] = action.total;\n }\n\n emit([doc.user, action_obj.timestamp], action_obj);\n }\n\n function processSubscriptionAction(action)\n {\n action_obj = {\n type: \"Subscription\",\n podcast_url: doc.ref_url,\n podcast_id: doc.podcast,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n device_id: action.device,\n }\n\n emit([doc.user, action_obj.timestamp], action_obj);\n }\n\n\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n in doc.actions)\n {\n processEpisodeAction(doc.actions[n]);\n }\n }\n if(doc.doc_type == \"PodcastUserState\")\n {\n for(var n in doc.actions)\n {\n processSubscriptionAction(doc.actions[n]);\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174516124054,{34264651,[]},9575427003}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,1,154765697,0, |
|---|
| 0 | + | [<<"device_history">>], |
|---|
| 0 | + | <<"function(doc)\n{\n function processEpisodeAction(action)\n {\n if(action.device == null)\n {\n return;\n }\n\n action_obj = {\n type: \"Episode\",\n podcast_url: doc.podcast_ref_url,\n episode_url: doc.ref_url,\n podcast_id: doc.podcast,\n episode_id: doc.episode,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n }\n\n if(action.device != null)\n {\n action_obj[\"device_id\"] = action.device;\n }\n if(action.started != null)\n {\n action_obj[\"started\"] = action.started;\n }\n if(action.playmark != null)\n {\n action_obj[\"position\"] = action.playmark;\n }\n if(action.total != null)\n {\n action_obj[\"total\"] = action.total;\n }\n\n emit([doc.user, action.device, action_obj.timestamp], action_obj);\n }\n\n function processSubscriptionAction(action)\n {\n action_obj = {\n type: \"Subscription\",\n podcast_url: doc.ref_url,\n podcast_id: doc.podcast,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n device_id: action.device,\n }\n\n emit([doc.user, action.device, action_obj.timestamp], action_obj);\n }\n\n\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n in doc.actions)\n {\n processEpisodeAction(doc.actions[n]);\n }\n }\n if(doc.doc_type == \"PodcastUserState\")\n {\n for(var n in doc.actions)\n {\n processSubscriptionAction(doc.actions[n]);\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174516131543,{33941072,[]},10984289352}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,2,154765665,0, |
|---|
| 0 | + | [<<"episode_states_by_podcast_episode">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n emit([doc.podcast, doc.episode, doc.user], null);\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174515962272,{21276414,[]},1661977208}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,3,154765665,0, |
|---|
| 0 | + | [<<"episode_states_by_user_episode">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n emit([doc.user, doc.episode], null);\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174515973619,{21276414,[]},1299411882}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,4,154765665,0, |
|---|
| 0 | + | [<<"episode_states_by_ref_urls">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n emit([doc.user, doc.podcast_ref_url, doc.ref_url], null);\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174516011233,{21276414,[]},2257232263}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,5,154765697,0, |
|---|
| 0 | + | [<<"episode_actions_podcast_device">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n in doc.actions)\n {\n action = doc.actions[n];\n\n action_obj = {\n podcast: doc.podcast_ref_url,\n episode: doc.ref_url,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n }\n\n if(action.device != null)\n {\n action_obj[\"device_id\"] = action.device;\n }\n if(action.started != null)\n {\n action_obj[\"started\"] = action.started;\n }\n if(action.playmark != null)\n {\n action_obj[\"position\"] = action.playmark;\n }\n if(action.total != null)\n {\n action_obj[\"total\"] = action.total;\n }\n\n\n emit([\n doc.user,\n doc.podcast,\n action.device,\n action_obj.timestamp,\n ], action_obj\n );\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174516139789,{33677961,[]},7161312350}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,6,154765697,0, |
|---|
| 0 | + | [<<"episode_actions_device">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n in doc.actions)\n {\n action = doc.actions[n];\n\n action_obj = {\n podcast: doc.podcast_ref_url,\n episode: doc.ref_url,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n }\n\n if(action.device != null)\n {\n action_obj[\"device_id\"] = action.device;\n }\n if(action.started != null)\n {\n action_obj[\"started\"] = action.started;\n }\n if(action.playmark != null)\n {\n action_obj[\"position\"] = action.playmark;\n }\n if(action.total != null)\n {\n action_obj[\"total\"] = action.total;\n }\n\n emit([\n doc.user,\n action.device,\n action_obj.timestamp,\n ], action_obj\n );\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174516147469,{33677961,[]},6763096451}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,7,154765697,0, |
|---|
| 0 | + | [<<"episode_actions">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n in doc.actions)\n {\n action = doc.actions[n];\n\n action_obj = {\n podcast: doc.podcast_ref_url,\n episode: doc.ref_url,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n }\n\n if(action.device != null)\n {\n action_obj[\"device_id\"] = action.device;\n }\n if(action.started != null)\n {\n action_obj[\"started\"] = action.started;\n }\n if(action.playmark != null)\n {\n action_obj[\"position\"] = action.playmark;\n }\n if(action.total != null)\n {\n action_obj[\"total\"] = action.total;\n }\n\n emit([\n doc.user,\n action_obj.timestamp\n ], action_obj\n );\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174516153644,{33677961,[]},6485662706}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,8,154765697,0, |
|---|
| 0 | + | [<<"episode_actions_podcast">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n in doc.actions)\n {\n action = doc.actions[n];\n\n action_obj = {\n podcast: doc.podcast_ref_url,\n episode: doc.ref_url,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n }\n\n if(action.device != null)\n {\n action_obj[\"device_id\"] = action.device;\n }\n if(action.started != null)\n {\n action_obj[\"started\"] = action.started;\n }\n if(action.playmark != null)\n {\n action_obj[\"position\"] = action.playmark;\n }\n if(action.total != null)\n {\n action_obj[\"total\"] = action.total;\n }\n\n emit([\n doc.user,\n doc.podcast,\n action_obj.timestamp\n ], action_obj\n );\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174516161371,{33677961,[]},6781675859}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,9,0,0, |
|---|
| 0 | + | [<<"chapters_by_episode">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n in doc.chapters)\n {\n var chapter = doc.chapters[n];\n emit([doc.episode, doc.user], chapter);\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {65286549651,{253,[]},13900}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,10,154765459,0,[], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n=doc.actions.length-1; n>=0; n--)\n {\n var action = doc.actions[n];\n if(action.action == \"play\")\n {\n var day = action.timestamp.slice(0, 10);\n emit([doc.episode, day], doc.user);\n return;\n }\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174515602943,{2882075,[2882075]},199075115}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [{<<"listeners_by_episode">>,<<"_count">>}], |
|---|
| 0 | + | []}, |
|---|
| 0 | + | {view,11,154765459,0,[], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n=doc.actions.length-1; n>=0; n--)\n {\n var action = doc.actions[n];\n if(action.action == \"play\")\n {\n var day = action.timestamp.slice(0, 10);\n emit([doc.podcast, day], doc.user);\n return;\n }\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174515607726,{2882075,[745247]},160815714}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [{<<"listeners_by_podcast">>, |
|---|
| 0 | + | <<"function (keys, values, rereduce)\n{\n function unique(arr) {\n var a = [];\n var l = arr.length;\n for(var i=0; i<l; i++) {\n for(var j=i+1; j<l; j++) {\n if (arr[i] === arr[j])\n j = ++i;\n }\n a.push(arr[i]);\n }\n return a;\n };\n\n if (rereduce)\n {\n return sum(values)\n }\n {\n /* We count one per user, not per play-event */\n val = unique(values);\n return val.length;\n }\n}">>}], |
|---|
| 0 | + | []}, |
|---|
| 0 | + | {view,12,154765459,0,[], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n=doc.actions.length-1; n>=0; n--)\n {\n var action = doc.actions[n];\n if(action.action == \"play\")\n {\n var day = action.timestamp.slice(0, 10);\n emit([doc.podcast, doc.episode, day], doc.user);\n return;\n }\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174515613550,{2882075,[1020610]},244659839}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [{<<"listeners_by_podcast_episode">>, |
|---|
| 0 | + | <<"function (keys, values, rereduce)\n{\n function unique(arr) {\n var a = [];\n var l = arr.length;\n for(var i=0; i<l; i++) {\n for(var j=i+1; j<l; j++) {\n if (arr[i] === arr[j])\n j = ++i;\n }\n a.push(arr[i]);\n }\n return a;\n };\n\n if (rereduce)\n {\n return sum(values)\n }\n {\n /* We count one per user, not per play-event */\n val = unique(values);\n return val.length;\n }\n}">>}], |
|---|
| 0 | + | []}, |
|---|
| 0 | + | {view,13,154765697,0,[], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n if(doc.actions == null || doc.actions.length == 0)\n {\n return;\n }\n\n function sortByStarted(a, b)\n {\n var x = a.started;\n var y = b.started;\n return ((x < y) ? -1 : ((x > y) ? 1 : 0));\n }\n\n function hasTimeValues(action)\n {\n return ((action != null) && (action.started != null) && (action.playmark != null));\n }\n\n var actions = doc.actions.slice(0); // creates a copy\n actions = actions.filter(hasTimeValues);\n actions.sort(sortByStarted);\n\n var played_parts = [];\n var flat_date = null;\n\n for(var n in actions)\n {\n var action = actions[n];\n\n if(flat_date == null)\n {\n flat_date = {start: action.started, end: action.playmark};\n played_parts.push(flat_date);\n continue;\n }\n\n if(action.started <= flat_date.end && action.playmark >= flat_date.end)\n {\n flat_date.end = action.playmark;\n }\n else if(action.started >= flat_date.start && action.playmark <= flat_date.end)\n {\n // part already contained\n continue;\n }\n else\n {\n flat_date = {start: action.started, end: action.playmark};\n played_parts.push(flat_date);\n }\n }\n\n if (played_parts.length == 0)\n {\n return;\n }\n\n var sections = [];\n for(var n in played_parts)\n {\n var part = played_parts[n];\n sections.push(part.start);\n sections.push(part.end);\n }\n\n emit([doc.podcast, doc.episode, doc.user], sections);\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174516182266, |
|---|
| 0 | + | {710222, |
|---|
| 0 | + | [{[{<<"heatmap">>, |
|---|
| 0 | + | [502747,472976,420462,394372,378930,367863, |
|---|
| 0 | + | 278749,260118,226577,197559,142217,114262, |
|---|
| 0 | + | 17976]}, |
|---|
| 0 | + | {<<"borders">>, |
|---|
| 0 | + | [0,53893900,55948338,59075545,61846547, |
|---|
| 0 | + | 64402477,68750666,80158983,83051922, |
|---|
| 0 | + | 86398351,90634192,96316257,99695977, |
|---|
| 0 | + | 102195099]}]}]}, |
|---|
| 0 | + | 76966115}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [{<<"episode_heatmap">>, |
|---|
| 0 | + | <<"function (keys, values, rereduce)\n{\n function unique(arr) {\n var a = [];\n var l = arr.length;\n for(var i=0; i<l; i++) {\n for(var j=i+1; j<l; j++) {\n if (arr[i] === arr[j])\n j = ++i;\n }\n a.push(arr[i]);\n }\n return a;\n };\n\n function flatten(arr)\n {\n var flattened = []\n for(var n in arr)\n {\n for(var x in arr[n])\n {\n flattened.push(arr[n][x]);\n }\n }\n return flattened\n };\n\n function sortNumerical(a, b)\n {\n if(a < b)\n {\n return -1;\n }\n else if (a > b)\n {\n return 1;\n }\n else\n {\n return 0;\n }\n };\n\n function mergeBorders(borders, maxBorders)\n {\n last = null;\n newBorders = [];\n\n lastBorder = borders[borders.length-1];\n minDist = lastBorder / maxBorders;\n\n for(var n in borders)\n {\n border = borders[n];\n\n if(last == null)\n {\n }\n else if (border == lastBorder)\n {\n }\n else if ((border - last) < minDist)\n {\n continue;\n }\n\n newBorders.push(border);\n last = border;\n }\n\n return newBorders;\n };\n\n var all_borders = [];\n\n if (rereduce)\n {\n for(var n in values)\n {\n all_borders.push(values[n].borders);\n }\n }\n else\n {\n all_borders = values;\n }\n\n var borders = flatten(all_borders);\n borders = unique(borders);\n borders.sort(sortNumerical);\n borders = mergeBorders(borders, 50);\n\n var heatmap = [];\n\n for(var n=0; n<borders.length-1; n++)\n {\n heatmap.push(0);\n }\n\n for(var n in values)\n {\n j = 0;\n var length = 0;\n var increment = 1;\n\n if(rereduce)\n {\n length = values[n].borders.length-1;\n increment = 1;\n }\n else\n {\n length = values[n].length;\n increment = 2;\n }\n\n\n for(var i=0; i<length; i+=increment)\n {\n var from = 0;\n var until = 0;\n\n if(rereduce)\n {\n from = values[n].borders[i];\n until = values[n].borders[i+1];\n }\n else\n {\n from = values[n][i];\n until = values[n][i+1];\n }\n\n while(borders[j] < from)\n {\n j++;\n }\n\n while(borders[j] < until)\n {\n if(rereduce)\n {\n heatmap[j++] += values[n].heatmap[i];\n }\n else\n {\n heatmap[j++] += 1;\n }\n }\n }\n }\n\n return {heatmap: heatmap, borders: borders};\n}">>}], |
|---|
| 0 | + | []}, |
|---|
| 0 | + | {view,14,154765697,0, |
|---|
| 0 | + | [<<"episode_states">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n if(doc.actions.length < 1)\n {\n return;\n }\n\n action = doc.actions[doc.actions.length-1];\n\n action_obj = {\n podcast_url: doc.podcast_ref_url,\n episode_url: doc.ref_url,\n podcast_id: doc.podcast,\n episode_id: doc.episode,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n }\n\n if(action.device != null)\n {\n action_obj[\"device_id\"] = action.device;\n }\n if(action.started != null)\n {\n action_obj[\"started\"] = action.started;\n }\n if(action.playmark != null)\n {\n action_obj[\"position\"] = action.playmark;\n }\n if(action.total != null)\n {\n action_obj[\"total\"] = action.total;\n }\n\n\n emit([doc.user, doc.podcast, doc.episode], action_obj);\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174516189474,{21272181,[]},6229489915}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,15,154760981,0, |
|---|
| 0 | + | [<<"podcast_states_by_podcast">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"PodcastUserState\")\n {\n emit([doc.podcast, doc.user], null);\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174505609463,{284567,[]},22510141}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,16,154760981,0, |
|---|
| 0 | + | [<<"podcast_states_by_user">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"PodcastUserState\")\n {\n emit([doc.user, doc.podcast], null);\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174505613746,{284567,[]},20394449}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,17,154760998,0, |
|---|
| 0 | + | [<<"podcast_states_by_device">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"PodcastUserState\")\n {\n var affected_devices = [];\n\n for(var n in doc.actions)\n {\n var action = doc.actions[n];\n if (affected_devices.indexOf(action.device) == -1)\n {\n affected_devices.push(action.device);\n }\n }\n\n for(var n in affected_devices)\n {\n var device = affected_devices[n];\n\n emit([device, doc.podcast], null);\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174505728883,{403564,[]},30533795}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,18,154765309,0,[], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"PodcastUserState\")\n {\n var subscribed_devices = [];\n\n for(var n in doc.actions)\n {\n var action = doc.actions[n];\n\n if(action.action == \"subscribe\")\n {\n subscribed_devices.push(action.device);\n }\n else\n {\n var index = subscribed_devices.indexOf(action.device);\n subscribed_devices.splice(index, 1);\n }\n }\n\n for(var n in subscribed_devices)\n {\n var device = subscribed_devices[n];\n\n if(doc.disabled_devices && (doc.disabled_devices.indexOf(device) > -1))\n {\n continue;\n }\n\n\n if(doc.settings == null || doc.settings.public_subscription == null)\n {\n var is_public = true;\n }\n else\n {\n var is_public = doc.settings.public_subscription;\n }\n\n emit([doc.user, is_public, doc.podcast, device], null);\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174515117982,{299330,[299330]},26781332}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [{<<"subscribed_podcasts_by_user">>,<<"_count">>}], |
|---|
| 0 | + | []}, |
|---|
| 0 | + | {view,19,154765309,0, |
|---|
| 0 | + | [<<"subscribed_podcasts_by_device">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"PodcastUserState\")\n {\n var subscribed_devices = [];\n\n for(var n in doc.actions)\n {\n var action = doc.actions[n];\n\n if(action.action == \"subscribe\")\n {\n subscribed_devices.push(action.device);\n }\n else\n {\n var index = subscribed_devices.indexOf(action.device);\n subscribed_devices.splice(index, 1);\n }\n }\n\n for(var n in subscribed_devices)\n {\n var device = subscribed_devices[n];\n\n if(doc.disabled_devices && (doc.disabled_devices.indexOf(device) > -1))\n {\n continue;\n }\n\n emit([device, doc.podcast], null);\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174515121176,{299330,[]},22969037}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,20,154765309,0,[], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"PodcastUserState\")\n {\n var subscribed_devices = [];\n\n for(var n in doc.actions)\n {\n var action = doc.actions[n];\n\n if(action.action == \"subscribe\")\n {\n subscribed_devices.push(action.device);\n }\n else\n {\n var index = subscribed_devices.indexOf(action.device);\n subscribed_devices.splice(index, 1);\n }\n }\n\n for(var n in subscribed_devices)\n {\n var device = subscribed_devices[n];\n\n if(doc.disabled_devices && (doc.disabled_devices.indexOf(device) > -1))\n {\n continue;\n }\n\n emit([doc.podcast, doc.user, device], null);\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174515124209,{299330,[299330]},35024813}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [{<<"subscriptions_by_podcast">>,<<"_count">>}], |
|---|
| 0 | + | []}, |
|---|
| 0 | + | {view,21,154688024,0, |
|---|
| 0 | + | [<<"suggestions_by_user">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"Suggestions\")\n {\n emit(doc.user, null);\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {173686983396,{24329,[]},1334860}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,22,154679416,0, |
|---|
| 0 | + | [<<"favorite_episodes_by_user">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == 'EpisodeUserState')\n {\n if (doc.settings && doc.settings.is_favorite)\n {\n emit(doc.user, {_id: doc.episode});\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {173529044751,{3201,[]},280464}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}], |
|---|
| 0 | + | {[]}, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174516118537,[],9103498326}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_btree.5.93788370>,nil,snappy}, |
|---|
| 0 | + | 154765811,0,nil,nil}, |
|---|
| 0 | + | <0.32066.573>,<0.11806.548>,true, |
|---|
| 0 | + | [{{<0.31998.573>,#Ref<0.0.10599.159587>},154765812}, |
|---|
| 0 | + | {{<0.32018.573>,#Ref<0.0.10599.159130>},154765812}], |
|---|
| 0 | + | <0.167.0>,false} |
|---|
| 0 | + | ** Reason for termination == |
|---|
| 0 | + | ** {view_duplicated_id,<<"8c40fc1a160920a958b95e8d111aabb0">>} |
|---|
| 0 | + | |
|---|
| 0 | + | [Tue, 17 Apr 2012 06:02:54 GMT] [error] [<0.32018.573>] Uncaught server error: {view_duplicated_id, |
|---|
| 0 | + | <<"8c40fc1a160920a958b95e8d111aabb0">>} |
|---|
| 0 | + | [Tue, 17 Apr 2012 06:02:54 GMT] [error] [<0.31998.573>] Uncaught server error: {view_duplicated_id, |
|---|
| 0 | + | <<"8c40fc1a160920a958b95e8d111aabb0">>} |
|---|
| 0 | + | [Tue, 17 Apr 2012 06:02:54 GMT] [info] [<0.31997.573>] 71.19.150.86 - - GET /mygpo/_design/users/_view/episode_states_by_ref_urls?include_docs=true&limit=1&key=%5B%2288270d2e57b685fea74bf2a747f02236%22%2C+%22http%3A%2F%2Fwww.marklevinshow.com%2Frss%2Filevin.xml%22%2C+%22http%3A%2F%2Fpodloc.andomedia.com%2FdloadTrack.mp3%3Fprm%3D2069xhttp%3A%2F%2Fpodfuse-dl.andomedia.com%2F800185%2Fpodfuse-origin.andomedia.com%2Fcitadel_origin%2Fpods%2Fmarklevin%2FLevin11012011.mp3%22%5D 200 |
|---|
| 0 | + | [Tue, 17 Apr 2012 06:02:54 GMT] [info] [<0.32012.573>] 71.19.150.86 - - GET /mygpo/_design/users/_view/episode_states_by_ref_urls?include_docs=true&limit=1&key=%5B%2288270d2e57b685fea74bf2a747f02236%22%2C+%22http%3A%2F%2Fwww.city-journal.org%2Fcjpodcasts.xml%22%2C+%22http%3A%2F%2Fwww.city-journal.org%2Fmp3%2F2009-03-04-Breitbart_Klavan.mp3%22%5D 200 |
|---|
| 0 | + | [Tue, 17 Apr 2012 06:02:54 GMT] [error] [<0.164.0>] {error_report,<0.31.0>, |
|---|
| 0 | + | {<0.164.0>,crash_report, |
|---|
| 0 | + | [[{initial_call,{couch_view_group,init,['Argument__1']}}, |
|---|
| 0 | + | {pid,<0.164.0>}, |
|---|
| 0 | + | {registered_name,[]}, |
|---|
| 0 | + | {error_info, |
|---|
| 0 | + | {exit, |
|---|
| 0 | + | {view_duplicated_id, |
|---|
| 0 | + | <<"8c40fc1a160920a958b95e8d111aabb0">>}, |
|---|
| 0 | + | [{gen_server,terminate,6}, |
|---|
| 0 | + | {proc_lib,init_p_do_apply,3}]}}, |
|---|
| 0 | + | {ancestors,[<0.163.0>]}, |
|---|
| 0 | + | {messages, |
|---|
| 0 | + | [{'$gen_cast', |
|---|
| 0 | + | {partial_update,<0.32066.573>, |
|---|
| 0 | + | {group, |
|---|
| 0 | + | <<53,2,238,250,177,14,34,184,223,68,148,80,27,54, |
|---|
| 0 | + | 51,55>>, |
|---|
| 0 | + | <0.165.0>,<<"_design/users">>,<<"javascript">>, |
|---|
| 0 | + | [], |
|---|
| 0 | + | [{view,0,154765697,0, |
|---|
| 0 | + | [<<"history">>], |
|---|
| 0 | + | <<"function(doc)\n{\n function processEpisodeAction(action)\n {\n action_obj = {\n type: \"Episode\",\n podcast_url: doc.podcast_ref_url,\n episode_url: doc.ref_url,\n podcast_id: doc.podcast,\n episode_id: doc.episode,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n }\n\n if(action.device != null)\n {\n action_obj[\"device_id\"] = action.device;\n }\n if(action.started != null)\n {\n action_obj[\"started\"] = action.started;\n }\n if(action.playmark != null)\n {\n action_obj[\"position\"] = action.playmark;\n }\n if(action.total != null)\n {\n action_obj[\"total\"] = action.total;\n }\n\n emit([doc.user, action_obj.timestamp], action_obj);\n }\n\n function processSubscriptionAction(action)\n {\n action_obj = {\n type: \"Subscription\",\n podcast_url: doc.ref_url,\n podcast_id: doc.podcast,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n device_id: action.device,\n }\n\n emit([doc.user, action_obj.timestamp], action_obj);\n }\n\n\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n in doc.actions)\n {\n processEpisodeAction(doc.actions[n]);\n }\n }\n if(doc.doc_type == \"PodcastUserState\")\n {\n for(var n in doc.actions)\n {\n processSubscriptionAction(doc.actions[n]);\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174516124054,{34264651,[]},9575427003}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,1,154765697,0, |
|---|
| 0 | + | [<<"device_history">>], |
|---|
| 0 | + | <<"function(doc)\n{\n function processEpisodeAction(action)\n {\n if(action.device == null)\n {\n return;\n }\n\n action_obj = {\n type: \"Episode\",\n podcast_url: doc.podcast_ref_url,\n episode_url: doc.ref_url,\n podcast_id: doc.podcast,\n episode_id: doc.episode,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n }\n\n if(action.device != null)\n {\n action_obj[\"device_id\"] = action.device;\n }\n if(action.started != null)\n {\n action_obj[\"started\"] = action.started;\n }\n if(action.playmark != null)\n {\n action_obj[\"position\"] = action.playmark;\n }\n if(action.total != null)\n {\n action_obj[\"total\"] = action.total;\n }\n\n emit([doc.user, action.device, action_obj.timestamp], action_obj);\n }\n\n function processSubscriptionAction(action)\n {\n action_obj = {\n type: \"Subscription\",\n podcast_url: doc.ref_url,\n podcast_id: doc.podcast,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n device_id: action.device,\n }\n\n emit([doc.user, action.device, action_obj.timestamp], action_obj);\n }\n\n\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n in doc.actions)\n {\n processEpisodeAction(doc.actions[n]);\n }\n }\n if(doc.doc_type == \"PodcastUserState\")\n {\n for(var n in doc.actions)\n {\n processSubscriptionAction(doc.actions[n]);\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174516131543,{33941072,[]},10984289352}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,2,154765665,0, |
|---|
| 0 | + | [<<"episode_states_by_podcast_episode">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n emit([doc.podcast, doc.episode, doc.user], null);\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174515962272,{21276414,[]},1661977208}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,3,154765665,0, |
|---|
| 0 | + | [<<"episode_states_by_user_episode">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n emit([doc.user, doc.episode], null);\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174515973619,{21276414,[]},1299411882}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,4,154765665,0, |
|---|
| 0 | + | [<<"episode_states_by_ref_urls">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n emit([doc.user, doc.podcast_ref_url, doc.ref_url], null);\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174516011233,{21276414,[]},2257232263}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,5,154765697,0, |
|---|
| 0 | + | [<<"episode_actions_podcast_device">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n in doc.actions)\n {\n action = doc.actions[n];\n\n action_obj = {\n podcast: doc.podcast_ref_url,\n episode: doc.ref_url,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n }\n\n if(action.device != null)\n {\n action_obj[\"device_id\"] = action.device;\n }\n if(action.started != null)\n {\n action_obj[\"started\"] = action.started;\n }\n if(action.playmark != null)\n {\n action_obj[\"position\"] = action.playmark;\n }\n if(action.total != null)\n {\n action_obj[\"total\"] = action.total;\n }\n\n\n emit([\n doc.user,\n doc.podcast,\n action.device,\n action_obj.timestamp,\n ], action_obj\n );\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174516139789,{33677961,[]},7161312350}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,6,154765697,0, |
|---|
| 0 | + | [<<"episode_actions_device">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n in doc.actions)\n {\n action = doc.actions[n];\n\n action_obj = {\n podcast: doc.podcast_ref_url,\n episode: doc.ref_url,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n }\n\n if(action.device != null)\n {\n action_obj[\"device_id\"] = action.device;\n }\n if(action.started != null)\n {\n action_obj[\"started\"] = action.started;\n }\n if(action.playmark != null)\n {\n action_obj[\"position\"] = action.playmark;\n }\n if(action.total != null)\n {\n action_obj[\"total\"] = action.total;\n }\n\n emit([\n doc.user,\n action.device,\n action_obj.timestamp,\n ], action_obj\n );\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174516147469,{33677961,[]},6763096451}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,7,154765697,0, |
|---|
| 0 | + | [<<"episode_actions">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n in doc.actions)\n {\n action = doc.actions[n];\n\n action_obj = {\n podcast: doc.podcast_ref_url,\n episode: doc.ref_url,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n }\n\n if(action.device != null)\n {\n action_obj[\"device_id\"] = action.device;\n }\n if(action.started != null)\n {\n action_obj[\"started\"] = action.started;\n }\n if(action.playmark != null)\n {\n action_obj[\"position\"] = action.playmark;\n }\n if(action.total != null)\n {\n action_obj[\"total\"] = action.total;\n }\n\n emit([\n doc.user,\n action_obj.timestamp\n ], action_obj\n );\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174516153644,{33677961,[]},6485662706}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,8,154765697,0, |
|---|
| 0 | + | [<<"episode_actions_podcast">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n in doc.actions)\n {\n action = doc.actions[n];\n\n action_obj = {\n podcast: doc.podcast_ref_url,\n episode: doc.ref_url,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n }\n\n if(action.device != null)\n {\n action_obj[\"device_id\"] = action.device;\n }\n if(action.started != null)\n {\n action_obj[\"started\"] = action.started;\n }\n if(action.playmark != null)\n {\n action_obj[\"position\"] = action.playmark;\n }\n if(action.total != null)\n {\n action_obj[\"total\"] = action.total;\n }\n\n emit([\n doc.user,\n doc.podcast,\n action_obj.timestamp\n ], action_obj\n );\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174516161371,{33677961,[]},6781675859}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,9,0,0, |
|---|
| 0 | + | [<<"chapters_by_episode">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n in doc.chapters)\n {\n var chapter = doc.chapters[n];\n emit([doc.episode, doc.user], chapter);\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {65286549651,{253,[]},13900}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,10,154765459,0,[], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n=doc.actions.length-1; n>=0; n--)\n {\n var action = doc.actions[n];\n if(action.action == \"play\")\n {\n var day = action.timestamp.slice(0, 10);\n emit([doc.episode, day], doc.user);\n return;\n }\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174515602943,{2882075,[2882075]},199075115}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [{<<"listeners_by_episode">>,<<"_count">>}], |
|---|
| 0 | + | []}, |
|---|
| 0 | + | {view,11,154765459,0,[], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n=doc.actions.length-1; n>=0; n--)\n {\n var action = doc.actions[n];\n if(action.action == \"play\")\n {\n var day = action.timestamp.slice(0, 10);\n emit([doc.podcast, day], doc.user);\n return;\n }\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174515607726,{2882075,[745247]},160815714}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [{<<"listeners_by_podcast">>, |
|---|
| 0 | + | <<"function (keys, values, rereduce)\n{\n function unique(arr) {\n var a = [];\n var l = arr.length;\n for(var i=0; i<l; i++) {\n for(var j=i+1; j<l; j++) {\n if (arr[i] === arr[j])\n j = ++i;\n }\n a.push(arr[i]);\n }\n return a;\n };\n\n if (rereduce)\n {\n return sum(values)\n }\n {\n /* We count one per user, not per play-event */\n val = unique(values);\n return val.length;\n }\n}">>}], |
|---|
| 0 | + | []}, |
|---|
| 0 | + | {view,12,154765459,0,[], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n for(var n=doc.actions.length-1; n>=0; n--)\n {\n var action = doc.actions[n];\n if(action.action == \"play\")\n {\n var day = action.timestamp.slice(0, 10);\n emit([doc.podcast, doc.episode, day], doc.user);\n return;\n }\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174515613550,{2882075,[1020610]},244659839}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [{<<"listeners_by_podcast_episode">>, |
|---|
| 0 | + | <<"function (keys, values, rereduce)\n{\n function unique(arr) {\n var a = [];\n var l = arr.length;\n for(var i=0; i<l; i++) {\n for(var j=i+1; j<l; j++) {\n if (arr[i] === arr[j])\n j = ++i;\n }\n a.push(arr[i]);\n }\n return a;\n };\n\n if (rereduce)\n {\n return sum(values)\n }\n {\n /* We count one per user, not per play-event */\n val = unique(values);\n return val.length;\n }\n}">>}], |
|---|
| 0 | + | []}, |
|---|
| 0 | + | {view,13,154765697,0,[], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n if(doc.actions == null || doc.actions.length == 0)\n {\n return;\n }\n\n function sortByStarted(a, b)\n {\n var x = a.started;\n var y = b.started;\n return ((x < y) ? -1 : ((x > y) ? 1 : 0));\n }\n\n function hasTimeValues(action)\n {\n return ((action != null) && (action.started != null) && (action.playmark != null));\n }\n\n var actions = doc.actions.slice(0); // creates a copy\n actions = actions.filter(hasTimeValues);\n actions.sort(sortByStarted);\n\n var played_parts = [];\n var flat_date = null;\n\n for(var n in actions)\n {\n var action = actions[n];\n\n if(flat_date == null)\n {\n flat_date = {start: action.started, end: action.playmark};\n played_parts.push(flat_date);\n continue;\n }\n\n if(action.started <= flat_date.end && action.playmark >= flat_date.end)\n {\n flat_date.end = action.playmark;\n }\n else if(action.started >= flat_date.start && action.playmark <= flat_date.end)\n {\n // part already contained\n continue;\n }\n else\n {\n flat_date = {start: action.started, end: action.playmark};\n played_parts.push(flat_date);\n }\n }\n\n if (played_parts.length == 0)\n {\n return;\n }\n\n var sections = [];\n for(var n in played_parts)\n {\n var part = played_parts[n];\n sections.push(part.start);\n sections.push(part.end);\n }\n\n emit([doc.podcast, doc.episode, doc.user], sections);\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174516182266, |
|---|
| 0 | + | {710222, |
|---|
| 0 | + | [{[{<<"heatmap">>, |
|---|
| 0 | + | [502747,472976,420462,394372,378930, |
|---|
| 0 | + | 367863,278749,260118,226577,197559, |
|---|
| 0 | + | 142217,114262,17976]}, |
|---|
| 0 | + | {<<"borders">>, |
|---|
| 0 | + | [0,53893900,55948338,59075545,61846547, |
|---|
| 0 | + | 64402477,68750666,80158983,83051922, |
|---|
| 0 | + | 86398351,90634192,96316257,99695977, |
|---|
| 0 | + | 102195099]}]}]}, |
|---|
| 0 | + | 76966115}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [{<<"episode_heatmap">>, |
|---|
| 0 | + | <<"function (keys, values, rereduce)\n{\n function unique(arr) {\n var a = [];\n var l = arr.length;\n for(var i=0; i<l; i++) {\n for(var j=i+1; j<l; j++) {\n if (arr[i] === arr[j])\n j = ++i;\n }\n a.push(arr[i]);\n }\n return a;\n };\n\n function flatten(arr)\n {\n var flattened = []\n for(var n in arr)\n {\n for(var x in arr[n])\n {\n flattened.push(arr[n][x]);\n }\n }\n return flattened\n };\n\n function sortNumerical(a, b)\n {\n if(a < b)\n {\n return -1;\n }\n else if (a > b)\n {\n return 1;\n }\n else\n {\n return 0;\n }\n };\n\n function mergeBorders(borders, maxBorders)\n {\n last = null;\n newBorders = [];\n\n lastBorder = borders[borders.length-1];\n minDist = lastBorder / maxBorders;\n\n for(var n in borders)\n {\n border = borders[n];\n\n if(last == null)\n {\n }\n else if (border == lastBorder)\n {\n }\n else if ((border - last) < minDist)\n {\n continue;\n }\n\n newBorders.push(border);\n last = border;\n }\n\n return newBorders;\n };\n\n var all_borders = [];\n\n if (rereduce)\n {\n for(var n in values)\n {\n all_borders.push(values[n].borders);\n }\n }\n else\n {\n all_borders = values;\n }\n\n var borders = flatten(all_borders);\n borders = unique(borders);\n borders.sort(sortNumerical);\n borders = mergeBorders(borders, 50);\n\n var heatmap = [];\n\n for(var n=0; n<borders.length-1; n++)\n {\n heatmap.push(0);\n }\n\n for(var n in values)\n {\n j = 0;\n var length = 0;\n var increment = 1;\n\n if(rereduce)\n {\n length = values[n].borders.length-1;\n increment = 1;\n }\n else\n {\n length = values[n].length;\n increment = 2;\n }\n\n\n for(var i=0; i<length; i+=increment)\n {\n var from = 0;\n var until = 0;\n\n if(rereduce)\n {\n from = values[n].borders[i];\n until = values[n].borders[i+1];\n }\n else\n {\n from = values[n][i];\n until = values[n][i+1];\n }\n\n while(borders[j] < from)\n {\n j++;\n }\n\n while(borders[j] < until)\n {\n if(rereduce)\n {\n heatmap[j++] += values[n].heatmap[i];\n }\n else\n {\n heatmap[j++] += 1;\n }\n }\n }\n }\n\n return {heatmap: heatmap, borders: borders};\n}">>}], |
|---|
| 0 | + | []}, |
|---|
| 0 | + | {view,14,154765697,0, |
|---|
| 0 | + | [<<"episode_states">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"EpisodeUserState\")\n {\n if(doc.actions.length < 1)\n {\n return;\n }\n\n action = doc.actions[doc.actions.length-1];\n\n action_obj = {\n podcast_url: doc.podcast_ref_url,\n episode_url: doc.ref_url,\n podcast_id: doc.podcast,\n episode_id: doc.episode,\n action: action.action,\n timestamp: action.timestamp.slice(0, action.timestamp.length-1),\n }\n\n if(action.device != null)\n {\n action_obj[\"device_id\"] = action.device;\n }\n if(action.started != null)\n {\n action_obj[\"started\"] = action.started;\n }\n if(action.playmark != null)\n {\n action_obj[\"position\"] = action.playmark;\n }\n if(action.total != null)\n {\n action_obj[\"total\"] = action.total;\n }\n\n\n emit([doc.user, doc.podcast, doc.episode], action_obj);\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174516189474,{21272181,[]},6229489915}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,15,154760981,0, |
|---|
| 0 | + | [<<"podcast_states_by_podcast">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"PodcastUserState\")\n {\n emit([doc.podcast, doc.user], null);\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174505609463,{284567,[]},22510141}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,16,154760981,0, |
|---|
| 0 | + | [<<"podcast_states_by_user">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"PodcastUserState\")\n {\n emit([doc.user, doc.podcast], null);\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174505613746,{284567,[]},20394449}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,17,154760998,0, |
|---|
| 0 | + | [<<"podcast_states_by_device">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"PodcastUserState\")\n {\n var affected_devices = [];\n\n for(var n in doc.actions)\n {\n var action = doc.actions[n];\n if (affected_devices.indexOf(action.device) == -1)\n {\n affected_devices.push(action.device);\n }\n }\n\n for(var n in affected_devices)\n {\n var device = affected_devices[n];\n\n emit([device, doc.podcast], null);\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174505728883,{403564,[]},30533795}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,18,154765309,0,[], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"PodcastUserState\")\n {\n var subscribed_devices = [];\n\n for(var n in doc.actions)\n {\n var action = doc.actions[n];\n\n if(action.action == \"subscribe\")\n {\n subscribed_devices.push(action.device);\n }\n else\n {\n var index = subscribed_devices.indexOf(action.device);\n subscribed_devices.splice(index, 1);\n }\n }\n\n for(var n in subscribed_devices)\n {\n var device = subscribed_devices[n];\n\n if(doc.disabled_devices && (doc.disabled_devices.indexOf(device) > -1))\n {\n continue;\n }\n\n\n if(doc.settings == null || doc.settings.public_subscription == null)\n {\n var is_public = true;\n }\n else\n {\n var is_public = doc.settings.public_subscription;\n }\n\n emit([doc.user, is_public, doc.podcast, device], null);\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174515117982,{299330,[299330]},26781332}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [{<<"subscribed_podcasts_by_user">>, |
|---|
| 0 | + | <<"_count">>}], |
|---|
| 0 | + | []}, |
|---|
| 0 | + | {view,19,154765309,0, |
|---|
| 0 | + | [<<"subscribed_podcasts_by_device">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"PodcastUserState\")\n {\n var subscribed_devices = [];\n\n for(var n in doc.actions)\n {\n var action = doc.actions[n];\n\n if(action.action == \"subscribe\")\n {\n subscribed_devices.push(action.device);\n }\n else\n {\n var index = subscribed_devices.indexOf(action.device);\n subscribed_devices.splice(index, 1);\n }\n }\n\n for(var n in subscribed_devices)\n {\n var device = subscribed_devices[n];\n\n if(doc.disabled_devices && (doc.disabled_devices.indexOf(device) > -1))\n {\n continue;\n }\n\n emit([device, doc.podcast], null);\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174515121176,{299330,[]},22969037}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,20,154765309,0,[], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"PodcastUserState\")\n {\n var subscribed_devices = [];\n\n for(var n in doc.actions)\n {\n var action = doc.actions[n];\n\n if(action.action == \"subscribe\")\n {\n subscribed_devices.push(action.device);\n }\n else\n {\n var index = subscribed_devices.indexOf(action.device);\n subscribed_devices.splice(index, 1);\n }\n }\n\n for(var n in subscribed_devices)\n {\n var device = subscribed_devices[n];\n\n if(doc.disabled_devices && (doc.disabled_devices.indexOf(device) > -1))\n {\n continue;\n }\n\n emit([doc.podcast, doc.user, device], null);\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174515124209,{299330,[299330]},35024813}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [{<<"subscriptions_by_podcast">>,<<"_count">>}], |
|---|
| 0 | + | []}, |
|---|
| 0 | + | {view,21,154688024,0, |
|---|
| 0 | + | [<<"suggestions_by_user">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == \"Suggestions\")\n {\n emit(doc.user, null);\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {173686983396,{24329,[]},1334860}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}, |
|---|
| 0 | + | {view,22,154679416,0, |
|---|
| 0 | + | [<<"favorite_episodes_by_user">>], |
|---|
| 0 | + | <<"function(doc)\n{\n if(doc.doc_type == 'EpisodeUserState')\n {\n if (doc.settings && doc.settings.is_favorite)\n {\n emit(doc.user, {_id: doc.episode});\n }\n }\n}">>, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {173529044751,{3201,[]},280464}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_view.less_json_ids.2>, |
|---|
| 0 | + | #Fun<couch_view_group.10.26766604>,snappy}, |
|---|
| 0 | + | [],[]}], |
|---|
| 0 | + | {[]}, |
|---|
| 0 | + | {btree,<0.165.0>, |
|---|
| 0 | + | {174516118537,[],9103498326}, |
|---|
| 0 | + | #Fun<couch_btree.3.71804109>, |
|---|
| 0 | + | #Fun<couch_btree.4.115144917>, |
|---|
| 0 | + | #Fun<couch_btree.5.93788370>,nil,snappy}, |
|---|
| 0 | + | 154765812,0,nil,nil}}}]}, |
|---|
| 0 | + | {links,[<0.165.0>,<0.123.0>]}, |
|---|
| 0 | + | {dictionary,[]}, |
|---|
| 0 | + | {trap_exit,true}, |
|---|
| 0 | + | {status,running}, |
|---|
| 0 | + | {heap_size,28657}, |
|---|
| 0 | + | {stack_size,24}, |
|---|
| 0 | + | {reductions,279415648}], |
|---|
| 0 | + | []]}} |
|---|
| 0 | + | [Tue, 17 Apr 2012 06:02:54 GMT] [error] [<0.165.0>] ** Generic server <0.165.0> terminating |
|---|
| 0 | + | ** Last message in was {'EXIT',<0.164.0>, |
|---|
| 0 | + | {view_duplicated_id, |
|---|
| 0 | + | <<"8c40fc1a160920a958b95e8d111aabb0">>}} |
|---|
| 0 | + | ** When Server state == {file,{file_descriptor,prim_file,{#Port<0.2656>,24}}, |
|---|
| 0 | + | 174516257850} |
|---|
| 0 | + | ** Reason for termination == |
|---|
| 0 | + | ** {view_duplicated_id,<<"8c40fc1a160920a958b95e8d111aabb0">>} |
|---|
| 0 | + | |
|---|
| 0 | + | [Tue, 17 Apr 2012 06:02:54 GMT] [error] [<0.165.0>] {error_report,<0.31.0>, |
|---|
| 0 | + | {<0.165.0>,crash_report, |
|---|
| 0 | + | [[{initial_call,{couch_file,init,['Argument__1']}}, |
|---|
| 0 | + | {pid,<0.165.0>}, |
|---|
| 0 | + | {registered_name,[]}, |
|---|
| 0 | + | {error_info, |
|---|
| 0 | + | {exit, |
|---|
| 0 | + | {view_duplicated_id, |
|---|
| 0 | + | <<"8c40fc1a160920a958b95e8d111aabb0">>}, |
|---|
| 0 | + | [{gen_server,terminate,6}, |
|---|
| 0 | + | {proc_lib,init_p_do_apply,3}]}}, |
|---|
| 0 | + | {ancestors,[<0.164.0>,<0.163.0>]}, |
|---|
| 0 | + | {messages,[]}, |
|---|
| 0 | + | {links,[<0.167.0>]}, |
|---|
| 0 | + | {dictionary,[]}, |
|---|
| 0 | + | {trap_exit,true}, |
|---|
| 0 | + | {status,running}, |
|---|
| 0 | + | {heap_size,2584}, |
|---|
| 0 | + | {stack_size,24}, |
|---|
| 0 | + | {reductions,131338932620}], |
|---|
| 0 | + | [{neighbour, |
|---|
| 0 | + | [{pid,<0.167.0>}, |
|---|
| 0 | + | {registered_name,[]}, |
|---|
| 0 | + | {initial_call, |
|---|
| 0 | + | {couch_ref_counter,init,['Argument__1']}}, |
|---|
| 0 | + | {current_function,{gen_server,loop,6}}, |
|---|
| 0 | + | {ancestors,[<0.164.0>,<0.163.0>]}, |
|---|
| 0 | + | {messages,[]}, |
|---|
| 0 | + | {links,[<0.165.0>]}, |
|---|
| 0 | + | {dictionary,[]}, |
|---|
| 0 | + | {trap_exit,false}, |
|---|
| 0 | + | {status,waiting}, |
|---|
| 0 | + | {heap_size,2584}, |
|---|
| 0 | + | {stack_size,9}, |
|---|
| 0 | + | {reductions,656072244}]}]]}} |
|---|
| 0 | + | [Tue, 17 Apr 2012 06:02:54 GMT] [info] [<0.32010.573>] 83.169.6.40 - - GET /mygpo/_design/core/_view/podcasts_by_id?key=%225c156ecbf8c7df16b999c8fe7ff8e942%22&include_docs=true 200 |
|---|
| 0 | + | [Tue, 17 Apr 2012 06:02:54 GMT] [error] [<0.31996.573>] Uncaught error in HTTP request: {exit, |
|---|
| 0 | + | {noproc, |
|---|
| 0 | + | {gen_server,call, |
|---|
| 0 | + | [<0.165.0>, |
|---|
| 0 | + | {pread_iolist, |
|---|
| 0 | + | 73832222373}, |
|---|
| 0 | + | infinity]}}} |
|---|
| 0 | + | [Tue, 17 Apr 2012 06:02:54 GMT] [info] [<0.32018.573>] 71.19.150.86 - - GET /mygpo/_design/users/_view/episode_actions?startkey=%5B%228cc9a038c211a5176e7d5383c4af3b79%22%2C+%221970-01-01T00%3A00%3A00%22%5D&endkey=%5B%228cc9a038c211a5176e7d5383c4af3b79%22%2C+%222012-04-17T06%3A01%3A36%22%5D 500 |
|---|
| 0 | + | [Tue, 17 Apr 2012 06:02:54 GMT] [info] [<0.31998.573>] 83.169.20.177 - - GET /mygpo/_design/users/_view/listeners_by_episode?endkey=%5B%2213a71e4257b823a76cd198de2d18508e%22%2C+%7B%7D%5D&group=true&group_level=1&reduce=true&startkey=%5B%2213a71e4257b823a76cd198de2d18508e%22%2C+null%5D 500 |
|---|
| 0 | + | [Tue, 17 Apr 2012 06:02:54 GMT] [error] [<0.32012.573>] Uncaught error in HTTP request: {exit, |
|---|
| 0 | + | {noproc, |
|---|
| 0 | + | {gen_server,call, |
|---|
| 0 | + | [<0.165.0>, |
|---|
| 0 | + | {pread_iolist, |
|---|
| 0 | + | 35471780464}, |
|---|
| 0 | + | infinity]}}} |
|---|
| 0 | + | [Tue, 17 Apr 2012 06:02:54 GMT] [info] [<0.32014.573>] 83.169.6.40 - - GET /mygpo/_design/core/_view/podcasts_by_id?key=%22018c39faf7f11fb9691c66118259a26e%22&include_docs=true 200 |
|---|
| 0 | + | [Tue, 17 Apr 2012 06:02:54 GMT] [info] [<0.31996.573>] Stacktrace: [{gen_server,call,3}, |
|---|
| 0 | + | {couch_file,pread_iolist,2}, |
|---|
| 0 | + | {couch_file,pread_binary,2}, |
|---|
| 0 | + | {couch_file,pread_term,2}, |
|---|
| 0 | + | {couch_btree,get_node,2}, |
|---|
| 0 | + | {couch_btree,stream_node,7}, |
|---|
| 0 | + | {couch_btree,stream_kp_node,7}, |
|---|
| 0 | + | {couch_btree,stream_kp_node,8}] |
|---|
| 0 | + | [Tue, 17 Apr 2012 06:02:54 GMT] [error] [<0.31996.573>] Uncaught server error: {noproc, |
|---|
| 0 | + | {gen_server,call, |
|---|
| 0 | + | [<0.165.0>, |
|---|
| 0 | + | {pread_iolist,73832222373}, |
|---|
| 0 | + | infinity]}} |
|---|
| 0 | + | [Tue, 17 Apr 2012 06:02:54 GMT] [info] [<0.32012.573>] Stacktrace: [{gen_server,call,3}, |
|---|
| 0 | + | {couch_file,pread_iolist,2}, |
|---|
| 0 | + | {couch_file,pread_binary,2}, |
|---|
| 0 | + | {couch_file,pread_term,2}, |
|---|
| 0 | + | {couch_btree,get_node,2}, |
|---|
| 0 | + | {couch_btree,stream_node,7}, |
|---|
| 0 | + | {couch_btree,stream_kp_node,7}, |
|---|
| 0 | + | {couch_btree,stream_kp_node,8}] |
|---|
| 0 | + | [Tue, 17 Apr 2012 06:02:54 GMT] [info] [<0.31996.573>] 71.19.150.86 - - GET /mygpo/_design/users/_view/episode_states_by_ref_urls?include_docs=true&limit=1&key=%5B%22123648da92647ac2a6aa6779295bc040%22%2C+%22http%3A%2F%2Fwww.cbc.ca%2Fpodcasting%2Fincludes%2Fspark.xml%22%2C+%22http%3A%2F%2Fpodcast.cbc.ca%2Fmp3%2Fpodcasts%2Fspark_20100613_33816.mp3%22%5D 500 |
|---|
| 0 | + | [Tue, 17 Apr 2012 06:02:54 GMT] [error] [<0.32012.573>] Uncaught server error: {noproc, |
|---|
| 0 | + | {gen_server,call, |
|---|
| 0 | + | [<0.165.0>, |
|---|
| 0 | + | {pread_iolist,35471780464}, |
|---|
| 0 | + | infinity]}} |
|---|
| 0 | + | [Tue, 17 Apr 2012 06:02:54 GMT] [info] [<0.32012.573>] 71.19.150.86 - - GET /mygpo/_design/users/_view/episode_states_by_ref_urls?include_docs=true&limit=1&key=%5B%2288270d2e57b685fea74bf2a747f02236%22%2C+%22http%3A%2F%2Fwww.city-journal.org%2Fcjpodcasts.xml%22%2C+%22http%3A%2F%2Fwww.city-journal.org%2Fmp3%2F2009-03-04-Breitbart_Klavan.mp3%22%5D 500 |
|---|
| 0 | + | [Tue, 17 Apr 2012 06:02:54 GMT] [info] [<0.32017.573>] 83.169.20.177 - - PUT /mygpo/87870b03cac96dfe08791e34fcebed78 201 |
|---|
| 0 | + | |
|---|
| ... | |
|---|