Skip to content
This repository was archived by the owner on Dec 20, 2024. It is now read-only.

Commit 886e96d

Browse files
committed
Test pipeline
1 parent b51952f commit 886e96d

File tree

3 files changed

+5
-18
lines changed

3 files changed

+5
-18
lines changed

.github/workflows/prefect-dev.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: prefect-dev
22
on:
3+
pull-request:
34
push:
45
branches: [ dev ]
56
jobs:

.github/workflows/prefect-prod.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
name: prefect-prod
22
on:
3+
pull_request:
34
push:
4-
branches: [ main ]
5+
#branches: [ main ]
6+
branches: [ dev ]
57
jobs:
68
prod-deployment:
79
runs-on: ubuntu-latest

src/deploy_prefect/flows.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
"""Prefect Deployment for Order Rewards Data"""
2-
import os
3-
42
# pylint: disable=import-error
53
from prefect import flow # type: ignore
64

@@ -13,23 +11,9 @@
1311
)
1412
from src.deploy_prefect.models import ENV, CHAIN, Config
1513

16-
def generate_pr_flow_name():
17-
return os.getenv("BRANCH_NAME")
18-
19-
@flow(flow_run_name=generate_pr_flow_name, retries=3, retry_delay_seconds=60, log_prints=True) # type: ignore[misc]
20-
def dev_order_rewards() -> None:
21-
"""Defines a flow for updating the order_rewards table"""
22-
config = Config(CHAIN.MAINNET, ENV.DEV)
23-
24-
blockrange = get_block_range()
25-
orderbook = fetch_orderbook(blockrange)
26-
data = cast_orderbook_to_dune_string(orderbook)
27-
table_name = upload_data_to_dune(data, blockrange.block_from, blockrange.block_to)
28-
update_aggregate_query(table_name, config)
29-
3014

3115
@flow(retries=3, retry_delay_seconds=60, log_prints=True) # type: ignore[misc]
32-
def tmp_dev_order_rewards() -> None:
16+
def dev_order_rewards() -> None:
3317
"""Defines a flow for updating the order_rewards table"""
3418
config = Config(CHAIN.MAINNET, ENV.DEV)
3519

0 commit comments

Comments
 (0)