Skip to content

Commit

Permalink
Merge pull request #2604 from get10101/chore/funding-fee-cleanup
Browse files Browse the repository at this point in the history
Funding fee cleanup
  • Loading branch information
luckysori authored Jun 5, 2024
2 parents 6fe1b6d + 5971ecf commit 646d777
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ close_expired_position_scheduler = "0 0 12 * * *"
close_liquidated_position_scheduler = "0 0 12 * * *"
update_user_bonus_status_scheduler = "0 0 0 * * *"
collect_metrics_scheduler = "0 0 * * * *"
generate_funding_fee_events_scheduler = "* * * * *"
generate_funding_fee_events_scheduler = "0 0 * * * *"
whitelist_enabled = false
whitelisted_makers = []
min_quantity = 1
Expand Down
2 changes: 1 addition & 1 deletion coordinator/src/db/funding_fee_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub(crate) fn insert(
diesel::result::DatabaseErrorKind::UniqueViolation,
_,
)) => {
tracing::debug!(
tracing::trace!(
position_id,
%trader_pubkey,
%due_date,
Expand Down
4 changes: 2 additions & 2 deletions coordinator/src/funding_fee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@ fn generate_funding_fee_events(
) -> Result<()> {
let mut conn = pool.get()?;

tracing::debug!("Generating funding fee events");
tracing::trace!("Generating funding fee events");

let funding_rate = db::funding_rates::get_funding_rate_charged_in_the_last_hour(&mut conn)?;

let funding_rate = match funding_rate {
Some(funding_rate) => funding_rate,
None => {
tracing::debug!("No current funding rate for this hour");
tracing::trace!("No current funding rate for this hour");
return Ok(());
}
};
Expand Down

0 comments on commit 646d777

Please sign in to comment.