def arguments_with_metadata(args, metadata)
      if args.is_a? Array
        [*args, metadata]
      else
        [args, metadata]
      end
    end
def arguments_with_metadata(args, metadata)
      if args.is_a? Array
        [*args, metadata]
      else
        [args, metadata]
      end
    end
Adds a Hash with schedule metadata as the last argument to call the worker.
 It currently returns the schedule time as a Float number representing the milisencods
 since epoch.

 @example with hash argument
   arguments_with_metadata({value: 1}, scheduled_at: Time.now)
   #=> [{value: 1}, {scheduled_at: <miliseconds since epoch>}]

 @param args [Array|Hash]
 @param metadata [Hash]
 @return [Array] arguments with added metadata