mirror of
https://github.com/davegallant/rfd-notify.git
synced 2025-08-06 08:43:39 +00:00
Add Dockerfile and Docker Hub publishing (#9)
Adds docker image publishing with example usage in the README.
This commit is contained in:
@@ -49,7 +49,7 @@ pub fn send(topic: &Topic, posts: &Posts, expression: &str, config: &Config) {
|
||||
.add_html(&html_message);
|
||||
|
||||
match sg.send(mail_info) {
|
||||
Err(err) => println!("Error: {}", err),
|
||||
Ok(body) => println!("Response: {}", body),
|
||||
Err(err) => println!("SendGrid failed to send mail. Error: {}", err),
|
||||
Ok(body) => println!("SendGrid Response: {}", body),
|
||||
};
|
||||
}
|
||||
|
@@ -36,7 +36,7 @@ fn main() {
|
||||
let config = matches.value_of("config").unwrap();
|
||||
let parsed_config = config::parse(config);
|
||||
|
||||
debug!("{:?}\n", parsed_config);
|
||||
info!("{:?}\n", parsed_config);
|
||||
let hot_deals = rfd::get_hot_deals().map_err(|err| error!("{:?}", err)).ok();
|
||||
let parsed_deals = rfd::parse_hot_deals(&hot_deals.unwrap());
|
||||
rfd::match_deals(
|
||||
|
@@ -83,7 +83,7 @@ pub fn match_deals(deals: Deals, config: Config, dbpath: &str) {
|
||||
.unwrap_or_else(|e| panic!("Invalid regex: {}. {}", expression, e));
|
||||
if re.is_match(&topic.title) {
|
||||
found_match = true;
|
||||
debug!(
|
||||
info!(
|
||||
"Expression '{}' matched title: {}",
|
||||
expression, &topic.title
|
||||
)
|
||||
@@ -91,7 +91,7 @@ pub fn match_deals(deals: Deals, config: Config, dbpath: &str) {
|
||||
let dealer_name = topic.offer.dealer_name.as_ref().unwrap();
|
||||
if re.is_match(&dealer_name) {
|
||||
found_match = true;
|
||||
debug!(
|
||||
info!(
|
||||
"Expression '{}' matched dealer: {}",
|
||||
expression, &topic.title
|
||||
)
|
||||
@@ -102,7 +102,7 @@ pub fn match_deals(deals: Deals, config: Config, dbpath: &str) {
|
||||
}
|
||||
let deal_hash = hash_deal(topic);
|
||||
if db::hash_exists(&deal_hash, db::get_config(dbpath)) {
|
||||
debug!("deal hash '{}' already exists", &deal_hash);
|
||||
info!("deal hash '{}' already exists", &deal_hash);
|
||||
} else {
|
||||
let posts = parse_posts(
|
||||
get_topic(topic.id)
|
||||
|
Reference in New Issue
Block a user