diff --git a/src/clj/commiteth/bounties.clj b/src/clj/commiteth/bounties.clj index 5ee96e8..2473a2e 100644 --- a/src/clj/commiteth/bounties.clj +++ b/src/clj/commiteth/bounties.clj @@ -22,7 +22,7 @@ (let [labels (:labels issue)] (some #(= label-name (:name %)) labels))) -(defn deploy-contract [owner owner-address repo issue-id issue-number] +(defn deploy-contract [owner-address issue-id] (if (empty? owner-address) (log/errorf "issue %s: Unable to deploy bounty contract because repo owner has no Ethereum addres" issue-id) (try @@ -47,7 +47,7 @@ (log/debug "issue %s: Adding bounty for issue %s/%s - owner address: %s" issue-id repo issue-number owner-address) (if (= 1 created-issue) - (deploy-contract owner owner-address repo issue-id issue-number) + (deploy-contract owner-address issue-id) (log/debug "issue %s: Issue already exists in DB, ignoring")))) (defn maybe-add-bounty-for-issue [repo repo-id issue] diff --git a/src/clj/commiteth/scheduler.clj b/src/clj/commiteth/scheduler.clj index 6985786..4329bd4 100644 --- a/src/clj/commiteth/scheduler.clj +++ b/src/clj/commiteth/scheduler.clj @@ -94,13 +94,10 @@ [] (p :deploy-pending-contracts (doseq [{issue-id :issue_id - issue-number :issue_number - owner :owner - owner-address :owner_address - repo :repo} (db-bounties/pending-contracts)] + owner-address :owner_address} (db-bounties/pending-contracts)] (log/infof "issue %s: Trying to re-deploy failed bounty contract deployment" issue-id) (try - (bounties/deploy-contract owner owner-address repo issue-id issue-number) + (bounties/deploy-contract owner-address issue-id) (catch Throwable t (log/errorf t "issue %s: deploy-pending-contracts exception: %s" issue-id (ex-data t))))))) @@ -436,11 +433,11 @@ (mount/defstate scheduler :start (let [every-minute (rest - (periodic-seq (t/now) - (t/minutes 1))) + (periodic-seq (t/now) + (t/minutes 1))) every-10-minutes (rest - (periodic-seq (t/now) - (t/minutes 10))) + (periodic-seq (t/now) + (t/minutes 10))) error-handler (fn [e] (log/error "Scheduled task failed" e) (throw e))