This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Fetch a list of station IDs | |
* | |
* @param {String} url | |
* @return {Array} ids | |
*/ | |
function fetchStationIDList(url, callback) { | |
request(url, function(error, response, html) { | |
if (!error && response.code == 200) { | |
var $ = cheerio.load(html); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* exported Station */ | |
var _ = require('lodash'), | |
/* | |
*async = require('async'), | |
*/ | |
kue = require('kue'), | |
config = require('config'), | |
request = require('request'), | |
cheerio = require('cheerio'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* exported Station */ | |
var _ = require('lodash'), | |
config = require('config'), | |
request = require('request'), | |
cheerio = require('cheerio'); | |
/** | |
* This module contains functions for scraping and storing data on | |
* California Data Exchange Center stations. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* exported Station */ | |
var _ = require('lodash'), | |
config = require('config'), | |
request = require('request'), | |
cheerio = require('cheerio'); | |
/** | |
* This module contains functions for scraping and storing data on | |
* California Data Exchange Center stations. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('#fetchHydroAreaIDList()', function(){ | |
it('should return an array of IDs from a hydro search', function(done){ | |
var hydroArea = 'CENTRAL+COAST'; | |
var foo = station.fetchHydroAreaIDList(hydroArea); | |
console.log(foo); | |
done(); | |
}); | |
}); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('#fetchHydroAreaIDList()', function(){ | |
it('should return an array of IDs from a hydro search', function(done){ | |
var hydroArea = 'CENTRAL+COAST'; | |
station.fetchHydroAreaIDList(hydroArea, function(stationIDs){ | |
console.log(stationIDs); | |
done(); | |
}); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### STDOUT for stopping Pacemaker | |
### | |
Signaling Pacemaker Cluster Manager to terminate: [ OK ] | |
Waiting for cluster services to unload:..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................^C | |
### /var/log/corosync/corosync.log | |
### | |
Dec 14 01:02:14 [28066] dev-nfs-archive-1001.va.opower.it lrmd: info: upstart_job_ru |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node $id="169102664" dev-nfs-archive-1001.va.opower.it | |
node $id="169102676" dev-nfs-archive-1002.va.opower.it \ | |
attributes standby="off" maintenance="off" | |
primitive p_export_rbd ocf:heartbeat:exportfs \ | |
params directory="/srv/nfs4" clientspec="10.20.77.0/255.255.255.0" options="rw,async,no_subtree_check,no_root_squash" fsid="1" \ | |
op monitor interval="10s" timeout="20s" \ | |
op start interval="0" timeout="40s" | |
primitive p_fs_rbd ocf:heartbeat:Filesystem \ | |
params directory="/srv/nfs4" fstype="ext4" device="/dev/rbd1" fast_stop="yes" \ | |
op monitor interval="20s" timeout="40s" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main):003:0> Feed.all | |
Feed Load (0.4ms) SELECT "feeds".* FROM "feeds" | |
=> #<ActiveRecord::Relation [#<Feed id: 1, title: nil, url: nil, description: nil, created_at: "2016-08-02 20:39:38", updated_at: "2016-08-02 20:39:38", items: []>]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TypeError (no implicit conversion of nil into String): | |
app/models/feed.rb:14:in `update' | |
app/controllers/feeds_controller.rb:24:in `create | |
def update | |
#prase the url as an rss feed | |
open(@url) do |rss| | |
getFeed = RSS::Parser.parse(rss) | |
#save the title of the feed |
OlderNewer