anchor.diff:    gen_server:call(fyler_server, {cancel_task, Id}).
   
   
  -handle_call({run_task, URL, Type, Options}, _From, #state{aws_bucket = Buckets, aws_dir = AwsDir} = State) ->
  -  case build_task(URL, Type, Options, false, Buckets, AwsDir) of
  +handle_call({run_task, URL, Type, Options}, _From, #state{aws_dir = AwsDir} = State) ->
  +  case build_task(URL, Type, Options, false, AwsDir) of
       #task{id = Id} = Task ->
         NewState = send_to_manager(Task, State),
         {reply, {ok, Id}, NewState};
  
positive.code:         _ ->
            pg_cli:equery("update tasks set status = 'failed', error_msg = 'bad_url' where id = " ++ integer_to_list(OldId))
        end,
        ?E({bad_url, URL, Buckets}),
        false
    end.
  
  
negative.code:   ).
  
  
  build_task(URL, Type, Options, OldId, AwsDir) ->
    case parse_url(URL) of
      {true, Bucket, Path, Name, Ext} ->
        %% generate temp uniq name
        UniqueDir = uniqueId() ++ "_" ++ Name,
  