Skip to content

Commit

Permalink
Use env vars to determine delay
Browse files Browse the repository at this point in the history
Signed-off-by: Laura Couto <laurarccouto@gmail.com>
  • Loading branch information
lrcouto committed Sep 9, 2024
1 parent 43b7571 commit f505a7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion performance-test/src/performance_test/hooks.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
from time import sleep
from typing import Dict

Expand All @@ -6,7 +7,7 @@
from pyspark import SparkConf
from pyspark.sql import SparkSession

HOOK_DELAY = 0
HOOK_DELAY = int(os.getenv("HOOKS_DELAY", 0))

class SparkHooks:
@hook_impl
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import os
from time import sleep

import pyspark.sql.functions as F
from pyspark.sql.window import Window

DATASET_LOAD_DELAY = 0
FILE_SAVE_DELAY = 0
DATASET_LOAD_DELAY = int(os.getenv("DATASET_LOAD_DELAY", 0))
FILE_SAVE_DELAY = int(os.getenv("FILE_SAVE_DELAY", 0))

def analyze_expenses_per_party(congress_expenses):
"""Calculate total expense per party."""
Expand Down

0 comments on commit f505a7f

Please sign in to comment.