Added --no-tweeing flag.
This commit is contained in:
parent
7a5db5ab19
commit
f9f689828b
@ -370,11 +370,11 @@
|
||||
description))])
|
||||
(fn [[image-path description]]
|
||||
(if (and image-path description)
|
||||
(if (:twitter config)
|
||||
(if (and (:tweeting-enabled? config) (:twitter config))
|
||||
(twitter/tweet (twitter/twit (:twitter config))
|
||||
description
|
||||
[image-path])
|
||||
(log-warn "Skipping tweeting: No twitter config provided"))
|
||||
(log-warn "Skipping tweeting"))
|
||||
(log-warn "Skipping tweet %s %s" image-path description)))))))))))
|
||||
|
||||
|
||||
@ -395,14 +395,15 @@
|
||||
(.requiredOption "--lat <lat>" "Latitude of the circle of region of interest" parse-number)
|
||||
(.requiredOption "--lon <lat>" "Longitude of the circle of the region of interest" parse-number)
|
||||
(.requiredOption "--url <url>" "API url")
|
||||
(.option "--queue <queue url>" "Queue URL (graphile)")
|
||||
(.option "--radius <radius>" "Radius of the circle of interest, in nautical miles" 20 parse-number)
|
||||
(.option "--no-tweeting" "Do not tweet.")
|
||||
(.parse (.-argv js/process)))
|
||||
(let [start-time (current-time)]
|
||||
(p/then (p/all [(read-history-db history-db-path)
|
||||
(util/read-config secrets-path)])
|
||||
(fn [[db config]]
|
||||
(p/let [data (get-adsbexchange-live-data
|
||||
(p/let [config (assoc config :tweeting-enabled? (.-tweeting commander))
|
||||
data (get-adsbexchange-live-data
|
||||
{:url (.-url commander)
|
||||
:api-key (get-in config [:adsbx :api-key])
|
||||
:lat (.-lat commander)
|
||||
|
@ -75,8 +75,8 @@
|
||||
(nil? bearing))
|
||||
|
||||
|
||||
(defn spurious-bearing-diff [^double bearing]
|
||||
(> (Math/abs bearing) 160))
|
||||
(defn spurious-bearing-diff [^double bearing-diff]
|
||||
(> (Math/abs bearing-diff) 160))
|
||||
|
||||
|
||||
(defn curviness
|
||||
|
Loading…
Reference in New Issue
Block a user