Skip to content

Commit

Permalink
Support timezone param for WebSocketTransport execute
Browse files Browse the repository at this point in the history
  • Loading branch information
nishantagarwal1990 committed Dec 14, 2023
1 parent 3cf4e64 commit 5ad91ac
Showing 1 changed file with 37 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public Computation execute(String program) {

/**
* This method is deprecated and will be removed in the next major release. Use
* {@link #execute(String, Long, Long, Long, Long, Boolean, Boolean)} instead
* {@link #execute(String, Long, Long, Long, Long, Boolean, Boolean, String)} instead
*
* Execute the given SignalFlow program with parameters and stream the output back.
*
Expand All @@ -77,11 +77,12 @@ public Computation execute(String program) {
@Deprecated
public Computation execute(String program, long start, long stop, long resolution,
long maxDelay, boolean persistent) {
return execute(program, start, stop, resolution, maxDelay, persistent, false);
return execute(program, start, stop, resolution, maxDelay, persistent, false, null);
}

/**
* Execute the given SignalFlow program with parameters and stream the output back.
* This method is deprecated and will be removed in the next major release. Use
* {@link #execute(String, Long, Long, Long, Long, Boolean, Boolean, String)} instead
*
* @param program
* computation written in signalflow language
Expand All @@ -104,10 +105,42 @@ public Computation execute(String program, long start, long stop, long resolutio
* future data to be available
* @return computation instance
*/
@Deprecated
public Computation execute(String program, Long start, Long stop, Long resolution,
Long maxDelay, Boolean persistent, Boolean immediate) {
return execute(program, start, stop, resolution, maxDelay, persistent, immediate, null);
}

/**
* Execute the given SignalFlow program with parameters and stream the output back.
*
* @param program
* computation written in signalflow language
* @param start
* Optional timestamp in milliseconds since epoch. Defaults to the current timestamp.
* @param stop
* Optional timestamp in milliseconds since epoch. Defaults to infinity.
* @param resolution
* Optional the minimum desired data resolution, in milliseconds. This allows the
* client to put an upper bound on the number of datapoints in the computation
* output.
* @param maxDelay
* Optional desired maximum data delay, in milliseconds between 1 and 900000. When
* set to zero or unset, max delay will be evaluated dynamically based on the
* historical lag information of the input data.
* @param persistent
* Optional persistent setting
* @param immediate
* Optional adjusts the stop timestamp so that the computation doesn't wait for
* future data to be available
* @param timeZone
* Optional the timezone to be used for computation
* @return computation instance
*/
public Computation execute(String program, Long start, Long stop, Long resolution,
Long maxDelay, Boolean persistent, Boolean immediate, String timeZone) {
Map<String, String> params = buildParams("start", start, "stop", stop, "resolution",
resolution, "maxDelay", maxDelay, "persistent", persistent, "immediate", immediate);
resolution, "maxDelay", maxDelay, "persistent", persistent, "immediate", immediate, "timezone", timeZone);
return new Computation(this.transport, program, params, false);
}

Expand Down

0 comments on commit 5ad91ac

Please sign in to comment.