-
Notifications
You must be signed in to change notification settings - Fork 1
[Feat] add forex #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
[Feat] add forex #141
Changes from 10 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
5d9f75e
add forex
a17fe05
fix copilot comment
b1e5404
add name
2465273
add forex stale time
f1a11f0
fix copilot comment
b5afb9f
add serde default to forex config
b3e2568
add macro deserialize comment
773a5ee
refactor macro
497bbb2
update stale_threshold
48c431d
fix test failed
8976ed0
change mod
87d5f9c
change prefix logic
6dcadb6
fix bitfinex and update version
ef340a1
add no run on bitfinex doctests
e538e75
let forex be optional
8b0282a
let forex and crypto be optinal
344dee8
delet serde default
c412cf6
default_stale_threshold from 3600 to 7200
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| // Macro to generate deserialization functions for Band workers with preset names. | ||
| // This macro defines a function that: | ||
| // - Deserializes an Option<WorkerOpts>, | ||
| // - If present, creates a new WorkerOpts with the given name and original URL/update_interval. | ||
| macro_rules! de_band_named { | ||
| ($fn_name:ident, $name:expr) => { | ||
| fn $fn_name<'de, D>(d: D) -> Result<Option<bothan_band::WorkerOpts>, D::Error> | ||
| where | ||
| D: serde::Deserializer<'de>, | ||
| { | ||
| use serde::Deserialize; | ||
| let v = Option::<bothan_band::WorkerOpts>::deserialize(d)?; | ||
| let v = v.map(|w| bothan_band::WorkerOpts::new($name, &w.url, Some(w.update_interval))); | ||
| Ok(v) | ||
| } | ||
| }; | ||
| } | ||
|
|
||
| pub(crate) use de_band_named; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.