peoplegroup-connectors 0.1.68 → 0.1.73
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c07a13c59d0ddf65e748dd87a0950cde5ee8ef8473c4f9631f85c4a0ff54bd5
|
4
|
+
data.tar.gz: 9ee17b36c6b17e973380caadd92e251ab68cffb28fc1510fc2518968aff9c41b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b85105c0f172fdc86e53e4dbe75e7fa7df5cf69d5bf24913ea2ed9d208ab70d79fd7b4435e968728618b5540c035e4ba64ea15ac9a78c12344453036ab679bd
|
7
|
+
data.tar.gz: cb9932f26eb72d2daf7fc3b17e8aa8cd8a25fdeb8e68e271dd38810eaac8ba40107ada841911a96051f563bd0507ccd0d9afade774b45ea167bf394f275d4263
|
@@ -169,7 +169,11 @@ module PeopleGroup
|
|
169
169
|
private
|
170
170
|
|
171
171
|
def retry_on_error(&block)
|
172
|
-
Utils.retry_on_error(errors:
|
172
|
+
Utils.retry_on_error(errors: retry_errors, delay: 3, &block)
|
173
|
+
end
|
174
|
+
|
175
|
+
def retry_errors
|
176
|
+
[Gitlab::Error::InternalServerError, Gitlab::Error::BadGateway, Gitlab::Error::ServiceUnavailable]
|
173
177
|
end
|
174
178
|
|
175
179
|
def find_epic(group_id, title)
|
@@ -16,13 +16,17 @@ module PeopleGroup
|
|
16
16
|
@client.offers_for_application(application_id)
|
17
17
|
end
|
18
18
|
|
19
|
+
def current_offer_for_application(application_id)
|
20
|
+
@client.current_offer_for_application(application_id)
|
21
|
+
end
|
22
|
+
|
19
23
|
def hired_candidates(updated_since)
|
20
24
|
page = 1
|
21
25
|
candidates = []
|
22
26
|
on_error = -> { p [updated_since, page] }
|
23
27
|
|
24
28
|
loop do
|
25
|
-
results = Utils.retry_on_error(errors: [GreenhouseIo::Error], on_error: on_error) do
|
29
|
+
results = Utils.retry_on_error(errors: [GreenhouseIo::Error, RestClient::InternalServerError], on_error: on_error) do
|
26
30
|
@client.candidates(nil, updated_after: updated_since, page: page)
|
27
31
|
end
|
28
32
|
|
@@ -51,6 +55,12 @@ module PeopleGroup
|
|
51
55
|
@client.create_candidate_note(candidate_id, note, ENV['GREENHOUSE_AUTHOR_ID'])
|
52
56
|
end
|
53
57
|
|
58
|
+
def candidates(id = nil, options = {})
|
59
|
+
Utils.retry_on_error(errors: [GreenhouseIo::Error, Net::OpenTimeout], on_error: on_error) do
|
60
|
+
get_from_harvest_api "#{BASE_URL}/candidates#{path_id(id)}", options, "candidates"
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
54
64
|
def users
|
55
65
|
page = 1
|
56
66
|
users = []
|
@@ -65,6 +65,10 @@ module PeopleGroup
|
|
65
65
|
def publish_view(user_id:, trigger:, view:)
|
66
66
|
@client.views_publish(user_id: user_id, trigger_id: trigger, view: view)
|
67
67
|
end
|
68
|
+
|
69
|
+
def get_message(channel:, timestamp:)
|
70
|
+
@client.conversations_history(channel: channel, latest: timestamp, limit: 1, inclusive: true)&.messages&.first
|
71
|
+
end
|
68
72
|
end
|
69
73
|
end
|
70
74
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: peoplegroup-connectors
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.73
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lien van den steen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gitlab
|