Open jaisingh opened 11 years ago
You need to remove the leading identifier (in this case data:
) that prepends the JSON string.
Try:
JSON.parse(s['na_error_meter'].sub(/^[\w:]*/,""))
Or, if you feel quesy about not removing the space as well: JSON.parse(s['na_error_meter'].sub(/^[\w\s:]*/,""))
currently using dashing (1.2.0) , the history.yml is generated but not reused on restart of sinatra. The file is read in but never transmitted or appended to which leads to the next event in
send_events
overwriting that particular key and history starting over again.Also the data stored in
settings.history['key']
cannot be json decoded by ruby and is not usable by the job.Data as encoded in history.yml file:
Class of key:
JSON parse error: