|
47 | 47 | # first argument is the endpoint name
|
48 | 48 | bp = Blueprint("covidcast", __name__)
|
49 | 49 | alias = None
|
50 |
| -JIT_COMPUTE = True |
| 50 | +JIT_COMPUTE_ON = True |
51 | 51 |
|
52 | 52 | latest_table = "epimetric_latest_v"
|
53 | 53 | history_table = "epimetric_full_v"
|
@@ -192,8 +192,8 @@ def alias_row(row):
|
192 | 192 | fields_float = ["value", "stderr", "sample_size"]
|
193 | 193 |
|
194 | 194 | # TODO: JIT computations don't support time_value = *; there may be a clever way to implement this.
|
195 |
| - use_server_side_compute = not any((issues, lag, is_time_type_week, is_time_value_true)) and JIT_COMPUTE and not jit_bypass |
196 |
| - if use_server_side_compute: |
| 195 | + use_jit_compute = not any((issues, lag, is_time_type_week, is_time_value_true)) and JIT_COMPUTE_ON and not jit_bypass |
| 196 | + if use_jit_compute: |
197 | 197 | transform_args = parse_transform_args()
|
198 | 198 | pad_length = get_pad_length(source_signal_pairs, transform_args.get("smoother_window_length"))
|
199 | 199 | time_pairs = pad_time_pairs(time_pairs, pad_length)
|
@@ -283,8 +283,8 @@ def gen_trend(rows):
|
283 | 283 | fields_int = ["time_value"]
|
284 | 284 | fields_float = ["value"]
|
285 | 285 |
|
286 |
| - use_server_side_compute = all((is_day, is_also_day)) and JIT_COMPUTE and not jit_bypass |
287 |
| - if use_server_side_compute: |
| 286 | + use_jit_compute = all((is_day, is_also_day)) and JIT_COMPUTE_ON and not jit_bypass |
| 287 | + if use_jit_compute: |
288 | 288 | pad_length = get_pad_length(source_signal_pairs, transform_args.get("smoother_window_length"))
|
289 | 289 | app.logger.info(f"JIT compute enabled for route '/trend': {source_signal_pairs}")
|
290 | 290 | source_signal_pairs, row_transform_generator = get_basename_signal_and_jit_generator(source_signal_pairs)
|
@@ -363,8 +363,8 @@ def gen_trend(rows):
|
363 | 363 | fields_int = ["time_value"]
|
364 | 364 | fields_float = ["value"]
|
365 | 365 |
|
366 |
| - use_server_side_compute = is_day and JIT_COMPUTE and not jit_bypass |
367 |
| - if use_server_side_compute: |
| 366 | + use_jit_compute = is_day and JIT_COMPUTE_ON and not jit_bypass |
| 367 | + if use_jit_compute: |
368 | 368 | pad_length = get_pad_length(source_signal_pairs, transform_args.get("smoother_window_length"))
|
369 | 369 | app.logger.info(f"JIT compute enabled for route '/trendseries': {source_signal_pairs}")
|
370 | 370 | source_signal_pairs, row_transform_generator = get_basename_signal_and_jit_generator(source_signal_pairs)
|
@@ -510,8 +510,8 @@ def handle_export():
|
510 | 510 | fields_int = ["time_value", "issue", "lag"]
|
511 | 511 | fields_float = ["value", "stderr", "sample_size"]
|
512 | 512 |
|
513 |
| - use_server_side_compute = all([is_day, is_end_day]) and JIT_COMPUTE and not jit_bypass |
514 |
| - if use_server_side_compute: |
| 513 | + use_jit_compute = all([is_day, is_end_day]) and JIT_COMPUTE_ON and not jit_bypass |
| 514 | + if use_jit_compute: |
515 | 515 | pad_length = get_pad_length(source_signal_pairs, transform_args.get("smoother_window_length"))
|
516 | 516 | app.logger.info(f"JIT compute enabled for route '/csv': {source_signal_pairs}")
|
517 | 517 | source_signal_pairs, row_transform_generator = get_basename_signal_and_jit_generator(source_signal_pairs)
|
|
0 commit comments