anchor.diff:      #pushy_job{id = safe_get(<<"id">>, LastRow),
                     org_id = safe_get(<<"org_id">>, LastRow),
                     command = safe_get(<<"command">>, LastRow),
  -                  status = job_status_atom(safe_get(<<"status">>, LastRow)),
  +                  status = job_status(safe_get(<<"status">>, LastRow)),
                     duration = safe_get(<<"duration">>, LastRow),
                     last_updated_by = safe_get(<<"last_updated_by">>, LastRow),
                     created_at = safe_get(<<"created_at">>, LastRow),
  
positive.code:                                       updated_at = UpdatedAt,
                                        node_name = NodeName,
                                        org_id = OrgId}) ->
      UpdateFields = [hb_status_code(Status), LastUpdatedBy, UpdatedAt, OrgId, NodeName],
      do_update(update_node_status_by_orgid_name, UpdateFields).
  
  %% job ops
  
negative.code: %% @doc Convenience function for assembling a job_node tuple from a proplist
  proplist_to_job_node(Proplist) ->
      {safe_get(<<"node_name">>, Proplist),
       job_status(safe_get(<<"status">>, Proplist)),
       safe_get(<<"created_at">>, Proplist),
       safe_get(<<"updated_at">>, Proplist)
       }.
  
  %% Heartbeat Status translators
  hb_status(idle) -> 1;
  hb_status(ready) -> 2;
  hb_status(running) -> 3;
  hb_status(restarting) -> 4;
  hb_status(1) -> idle;
  hb_status(2) -> ready;
  hb_status(3) -> running;
  hb_status(4) -> restarting.
  
  %% Job Status translators
  job_status(new) -> 0;
  job_status(executing) -> 1;
  job_status(complete) -> 2;
  job_status(error) -> 3;
  job_status(failed) -> 4;
  job_status(expired) -> 5;
  job_status(aborted) -> 6;
  job_status(0) -> new;
  job_status(1) -> executing;
  job_status(2) -> complete;
  job_status(3) -> error;
  job_status(4) -> failed;
  job_status(5) -> expired;
  job_status(6) -> aborted.
  
  %% CHEF_COMMON CARGO_CULT
  %% chef_sql:flatten_record/1
  