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

Commit

Permalink
Test pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
bram-vdberg committed Nov 4, 2024
1 parent b51952f commit 886e96d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
1 change: 1 addition & 0 deletions .github/workflows/prefect-dev.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: prefect-dev
on:
pull-request:
push:
branches: [ dev ]
jobs:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/prefect-prod.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: prefect-prod
on:
pull_request:
push:
branches: [ main ]
#branches: [ main ]
branches: [ dev ]
jobs:
prod-deployment:
runs-on: ubuntu-latest
Expand Down
18 changes: 1 addition & 17 deletions src/deploy_prefect/flows.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""Prefect Deployment for Order Rewards Data"""
import os

# pylint: disable=import-error
from prefect import flow # type: ignore

Expand All @@ -13,23 +11,9 @@
)
from src.deploy_prefect.models import ENV, CHAIN, Config

def generate_pr_flow_name():
return os.getenv("BRANCH_NAME")

@flow(flow_run_name=generate_pr_flow_name, retries=3, retry_delay_seconds=60, log_prints=True) # type: ignore[misc]
def dev_order_rewards() -> None:
"""Defines a flow for updating the order_rewards table"""
config = Config(CHAIN.MAINNET, ENV.DEV)

blockrange = get_block_range()
orderbook = fetch_orderbook(blockrange)
data = cast_orderbook_to_dune_string(orderbook)
table_name = upload_data_to_dune(data, blockrange.block_from, blockrange.block_to)
update_aggregate_query(table_name, config)


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

Expand Down

0 comments on commit 886e96d

Please sign in to comment.