anchor.diff:  -include("pushy_sql.hrl").
   -include_lib("pushy_common/include/pushy_metrics.hrl").
   -include_lib("pushy_common/include/pushy_messaging.hrl").
  +
  +-define(MAX_JOB_ID_LENGTH, 64).
   
   %% API
   -export([start_link/2,
  
positive.code:     gproc:unreg({n, l, GprocCurAddr}),
      process_message(State#state{node_addr=NewAddr}, Message);
  process_message(#state{node_ref=NodeRef, node_addr=Address} = State, #pushy_message{address=Address, body=Data}) ->
      JobId = ej:get({<<"job_id">>}, Data),
      Type = message_type_to_atom(ej:get({<<"type">>}, Data)),
      lager:debug("Received message for Node ~p Type ~p (address ~p)",
                  [NodeRef, Type, pushy_tools:bin_to_hex(Address)]),
  
negative.code: message_type_to_atom(<<"succeeded">>) -> succeeded;
  message_type_to_atom(_) -> unknown.
  
  %%
  %% TODO: This should be revisited when we tackle OC-5328 (handle ill formed packets set to pushy)
  %%
  extract_job_id(Data) ->
      case ej:get({<<"job_id">>}, Data) of
          <<"null">> ->
              null;
          null ->
              null;
          X when is_binary(X) andalso size(X) < ?MAX_JOB_ID_LENGTH ->
              X;
          _ ->
              invalid_job_id
      end.
  