Skip to content
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

Process event creation through SQS queue #195

Merged
merged 77 commits into from
Jan 23, 2025
Merged
Changes from 1 commit
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
782491e
add events to shoryuken config
wendelfabianchinsamy Nov 27, 2024
279b0e8
add events to shoryuken config
wendelfabianchinsamy Nov 28, 2024
4d4169d
include Queueable
wendelfabianchinsamy Nov 28, 2024
36cb616
rework specs
wendelfabianchinsamy Nov 28, 2024
3e0b150
creator EventImportWorker
wendelfabianchinsamy Nov 29, 2024
7a96452
move event import processing to a new Event model
wendelfabianchinsamy Nov 29, 2024
a06893a
add event import worker specs
wendelfabianchinsamy Nov 29, 2024
9717922
add localstack setup in order to run and test workflows locally
wendelfabianchinsamy Dec 3, 2024
c8ec789
refactor
wendelfabianchinsamy Dec 13, 2024
8897492
merge main
wendelfabianchinsamy Jan 6, 2025
4d9a864
fix specs
wendelfabianchinsamy Jan 6, 2025
13176bb
fix specs...this sucked
wendelfabianchinsamy Jan 8, 2025
33df62f
add env variable back
wendelfabianchinsamy Jan 9, 2025
3a40932
add logging for debugging
wendelfabianchinsamy Jan 10, 2025
67a3bf3
add logging for debugging
wendelfabianchinsamy Jan 10, 2025
a090d8d
add logging for debugging
wendelfabianchinsamy Jan 10, 2025
8ef6ef2
add logging for debugging
wendelfabianchinsamy Jan 10, 2025
8646e50
add logging for debugging
wendelfabianchinsamy Jan 10, 2025
151466f
add logging for debugging
wendelfabianchinsamy Jan 10, 2025
8cb4334
add logging for debugging
wendelfabianchinsamy Jan 10, 2025
3c130a5
add logging for debugging
wendelfabianchinsamy Jan 10, 2025
16fc129
add logging for debugging
wendelfabianchinsamy Jan 10, 2025
a03d7f8
add logging
wendelfabianchinsamy Jan 10, 2025
4cb73ac
add spec back
wendelfabianchinsamy Jan 10, 2025
89b433b
fix logging issue with spec
wendelfabianchinsamy Jan 10, 2025
92a8d57
hardcode subj_id
wendelfabianchinsamy Jan 10, 2025
08e71fc
comment out expect line temporarily
wendelfabianchinsamy Jan 10, 2025
284ef48
exclude test expection
wendelfabianchinsamy Jan 10, 2025
de7a987
rework spec for staging testing
wendelfabianchinsamy Jan 10, 2025
b343811
log event service response
wendelfabianchinsamy Jan 13, 2025
e001fac
rework specs temporarily
wendelfabianchinsamy Jan 13, 2025
9259487
add logging for debugging
wendelfabianchinsamy Jan 13, 2025
32edcfd
add logging for debugging
wendelfabianchinsamy Jan 13, 2025
3ae0afd
add logging for debugging
wendelfabianchinsamy Jan 13, 2025
502bee8
add logging for debugging
wendelfabianchinsamy Jan 13, 2025
7d4aac3
add logging for debugging
wendelfabianchinsamy Jan 13, 2025
5e60deb
add logging for debugging
wendelfabianchinsamy Jan 13, 2025
a38927b
add logging for debugging
wendelfabianchinsamy Jan 13, 2025
693c22e
add logging for debugging
wendelfabianchinsamy Jan 14, 2025
6e1a02a
add logging for debugging
wendelfabianchinsamy Jan 14, 2025
ef8fc54
add logging for debugging
wendelfabianchinsamy Jan 14, 2025
1eaebcb
add logging for debugging
wendelfabianchinsamy Jan 14, 2025
9133119
add logging for debugging
wendelfabianchinsamy Jan 14, 2025
4ebd413
add logging for debugging
wendelfabianchinsamy Jan 14, 2025
e7876ab
add logging for debugging
wendelfabianchinsamy Jan 14, 2025
074bef1
add logging for debugging
wendelfabianchinsamy Jan 14, 2025
82c5180
add logging for debugging
wendelfabianchinsamy Jan 14, 2025
8250c18
add logging for debugging
wendelfabianchinsamy Jan 14, 2025
9c44d1b
add logging for debugging
wendelfabianchinsamy Jan 14, 2025
9b8829d
add logging for debugging
wendelfabianchinsamy Jan 14, 2025
b2a0f55
add logging for debugging
wendelfabianchinsamy Jan 14, 2025
83e2ca1
add logging for debugging
wendelfabianchinsamy Jan 14, 2025
06934e6
remove debug logging since funders has been tested successfully
wendelfabianchinsamy Jan 15, 2025
a9150ba
add logging for debugging
wendelfabianchinsamy Jan 15, 2025
963eec8
add logging for debugging
wendelfabianchinsamy Jan 15, 2025
970d307
add logging for debugging
wendelfabianchinsamy Jan 15, 2025
efaa2b7
add logging for debugging
wendelfabianchinsamy Jan 15, 2025
08e26bd
add logging for debugging
wendelfabianchinsamy Jan 15, 2025
48c41b9
add logging for debugging
wendelfabianchinsamy Jan 15, 2025
a0169e3
add logging for debugging
wendelfabianchinsamy Jan 15, 2025
9d12874
add logging for debugging
wendelfabianchinsamy Jan 15, 2025
8f0d2eb
add logging for debugging
wendelfabianchinsamy Jan 15, 2025
68c7668
add logging for debugging
wendelfabianchinsamy Jan 16, 2025
fb93250
revert change as test was successful
wendelfabianchinsamy Jan 16, 2025
baab680
remove logging
wendelfabianchinsamy Jan 17, 2025
e4ab716
add logging for debugging
wendelfabianchinsamy Jan 17, 2025
06c8a1f
add logging for debugging
wendelfabianchinsamy Jan 20, 2025
cc168eb
add logging for debugging
wendelfabianchinsamy Jan 21, 2025
b215ad4
add logging for debugging
wendelfabianchinsamy Jan 21, 2025
85f5bcf
add logging for debugging
wendelfabianchinsamy Jan 21, 2025
0f79643
add logging for debugging
wendelfabianchinsamy Jan 21, 2025
6bf4334
add logging for debugging
wendelfabianchinsamy Jan 21, 2025
92bdf43
testing cleanup
wendelfabianchinsamy Jan 21, 2025
9dcaaa1
remove superfluous logging
wendelfabianchinsamy Jan 21, 2025
3c4f9d8
change logging prefix identifier
wendelfabianchinsamy Jan 23, 2025
436a4d2
fix spec
wendelfabianchinsamy Jan 23, 2025
6f0cc9e
change logging identifier
wendelfabianchinsamy Jan 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add logging for debugging
wendelfabianchinsamy committed Jan 14, 2025
commit 9c44d1b75ddaee7bbb5605e7b2cb38040905b250
13 changes: 2 additions & 11 deletions app/models/funder_identifier.rb
Original file line number Diff line number Diff line change
@@ -64,24 +64,15 @@ def self.push_item(item)
end

push_items = Array.wrap(funder_identifiers).reduce([]) do |ssum, iitem|
Rails.logger.info("[Event Import Worker]: Funding references inside push_items")

funder_identifier = iitem.fetch("funderIdentifier",
nil).to_s.strip.downcase

Rails.logger.info("[Event Import Worker]: Funding references funder_identifier #{funder_identifier}")

obj_id = normalize_doi(funder_identifier)

Rails.logger.info("[Event Import Worker]: Funding references obj_id #{obj_id}")
# obj_id = normalize_doi(funder_identifier)
obj_id = "https://doi.org/10.4224/17210691"

relation_type_id = "is_funded_by"
source_id = "datacite_funder"
source_token = ENV["DATACITE_FUNDER_SOURCE_TOKEN"]

Rails.logger.info("[Event Import Worker]: Funding references funder_identifier #{funder_identifier.present?}")
Rails.logger.info("[Event Import Worker]: Funding references obj_id #{obj_id.present?}")

if funder_identifier.present? && obj_id.present?
subj = cached_datacite_response(pid)
Rails.logger.info("[Event Import Worker]: Funding references subj #{subj}")