Olá, estou testando a integração entre o i-Educar e o i-Diário e me deparei com erro no processo de sincronização.
O processo de sincronização se inicia conforme documentação, começa a sincronizar alguns dados como por exemplo os cadastros das escolas porém em em terminado ponto apresenta o seguinte erro.
A minha instalação do i-Educar é uma instalação limpa e tem somente a importação do censo escolar realizada.
2021-06-02T14:02:14.532Z 54937 TID-oulw16fc4 SynchronizerBuilderWorker JID-da9309a71bf83a8db6f2e507 INFO: start
2021-06-02T14:02:14.545Z 54937 TID-oum0eeuew SynchronizerBuilderWorker JID-b7cc1865a0144e110a74bf29 INFO: done: 0.437 sec
2021-06-02T14:02:14.584Z 54937 TID-gnc2ro4io SynchronizerBuilderWorker JID-a9b4dec4b5b6592cb7b3a8a6 INFO: done: 0.425 sec
2021-06-02T14:02:14.597Z 54923 TID-ovbx8hpm4 SynchronizerBuilderEnqueueWorker JID-4ffaf01b114022062c784388 INFO: start
2021-06-02T14:02:14.620Z 54937 TID-oulzgvp30 SynchronizerBuilderWorker JID-b0e5adad96638e315aed38b9 INFO: done: 0.273 sec
2021-06-02T14:02:14.642Z 54937 TID-gnc2em1xw SynchronizerBuilderWorker JID-fc9334f4eead557b5dd41935 INFO: done: 0.395 sec
2021-06-02T14:02:14.713Z 54923 TID-ovbx8hpm4 SynchronizerBuilderEnqueueWorker JID-4ffaf01b114022062c784388 INFO: done: 0.117 sec
2021-06-02T14:02:14.718Z 54937 TID-oulub3ztw SynchronizerBuilderWorker JID-f287f1a3ef5e9c32ad956b86 INFO: done: 0.354 sec
2021-06-02T14:02:14.738Z 54937 TID-oum0eeuew SynchronizerBuilderWorker JID-276316ea653ebb14efda85ea INFO: start
2021-06-02T14:02:14.741Z 54937 TID-gnc2ro4io SynchronizerBuilderWorker JID-77cb0796b33510ccf981e06c INFO: start
2021-06-02T14:02:14.768Z 54937 TID-gnc2e8d2k SynchronizerBuilderWorker JID-5f99664db34f2030b5918df9 INFO: start
2021-06-02T14:02:14.840Z 54937 TID-oulw16fc4 SynchronizerBuilderWorker JID-da9309a71bf83a8db6f2e507 INFO: done: 0.309 sec
2021-06-02T14:02:14.923Z 54937 TID-gnc2ro4io SynchronizerBuilderWorker JID-77cb0796b33510ccf981e06c INFO: done: 0.182 sec
2021-06-02T14:02:15.002Z 54937 TID-oum0eeuew SynchronizerBuilderWorker JID-276316ea653ebb14efda85ea INFO: done: 0.264 sec
2021-06-02T14:02:15.107Z 54937 TID-gnc2e8d2k SynchronizerBuilderWorker JID-5f99664db34f2030b5918df9 INFO: done: 0.339 sec
2021-06-02T14:02:19.266Z 54937 TID-gnc2em074 SynchronizerExecuterWorker JID-141c9beb42075d6f2978a9fc INFO: done: 30.788 sec
2021-06-02T14:02:19.363Z 54937 TID-gnc2a8o7s SynchronizerExecuterWorker JID-1f4ae5172c22a42d5f59340d INFO: done: 29.851 sec
2021-06-02T14:02:23.251Z 54937 TID-gnc244xh4 SynchronizerExecuterWorker JID-8cc300556f814750126375d3 INFO: done: 34.749 sec
2021-06-02T14:02:26.129Z 54937 TID-oulzgvp30 StudentsUpdateUsesDifferentiatedExamRuleWorker JID-7e0fb6dde214271d2ef4465f INFO: start
2021-06-02T14:02:26.130Z 54937 TID-gnc2em1xw StudentsUpdateUsesDifferentiatedExamRuleWorker JID-4c763fae05c25ede32997fbd INFO: start
2021-06-02T14:02:26.143Z 54937 TID-oulw16fc4 SynchronizerExecuterWorker JID-34af4c0f4100961968d5a986 INFO: start
2021-06-02T14:02:26.148Z 54937 TID-oulub3ztw StudentsUpdateUsesDifferentiatedExamRuleWorker JID-4a97b5374f158963663e3fe0 INFO: start
2021-06-02T14:02:26.149Z 54937 TID-oulzgvp30 StudentsUpdateUsesDifferentiatedExamRuleWorker JID-7e0fb6dde214271d2ef4465f INFO: done: 0.019 sec
2021-06-02T14:02:26.150Z 54923 TID-ovbx8hpm4 SynchronizerBuilderEnqueueWorker JID-457d5086d97218793aef40ef INFO: start
2021-06-02T14:02:26.165Z 54937 TID-gnc2em1xw StudentsUpdateUsesDifferentiatedExamRuleWorker JID-4c763fae05c25ede32997fbd INFO: done: 0.034 sec
2021-06-02T14:02:26.195Z 54937 TID-oulw16fc4 SynchronizerExecuterWorker JID-34af4c0f4100961968d5a986 SidekiqUniqueJobs::Server::Middleware DIG-uniquejobs:51cfc8a4468b0f47e134396b993a1726 INFO: GET http://144.126.130.66/module/Api/Turma?access_key=3fa1d7cbc2c045c0a0b42c8b0ad1581e521031cb490a0a2a109f5f4925926e7410ea694c1b562955ccb6e44d210e3cf9a1f2203a4e401818d14210acaf6a8108&ano=2020&escola=3&instituicao_id=1&oper=get&resource=turmas-por-escola&secret_key=532e79872f2517f1e244e1ae1f939c72dccda74c7714f395c753271bf20fe0950aeeb003d9be37dee300b4af47ac9cfdfb3f3ddfd58d75d21d6fb7e5b09e7171 payload: {}
2021-06-02T14:02:26.220Z 54937 TID-oulub3ztw StudentsUpdateUsesDifferentiatedExamRuleWorker JID-4a97b5374f158963663e3fe0 INFO: done: 0.072 sec
2021-06-02T14:02:26.338Z 54937 TID-oulw16fc4 SynchronizerExecuterWorker JID-34af4c0f4100961968d5a986 SidekiqUniqueJobs::Server::Middleware DIG-uniquejobs:51cfc8a4468b0f47e134396b993a1726 ERROR: Failed to execute job, restoring lock
2021-06-02T14:02:26.341Z 54937 TID-oulw16fc4 SynchronizerExecuterWorker JID-34af4c0f4100961968d5a986 INFO: fail: 0.198 sec
2021-06-02T14:02:26.344Z 54937 TID-oulw16fc4 WARN: {“context”:“Job raised exception”,“job”:{“class”:“SynchronizerExecuterWorker”,“args”:[{“klass”:“ClassroomsSynchronizer”,“synchronization_id”:1,“worker_batch_id”:1,“entity_id”:1,“year”:“2020”,“unity_api_code”:“3”,“filtered_by_year”:true,“filtered_by_unity”:true,“current_years”:true,“worker_state_id”:42}],“retry”:3,“queue”:“synchronizer”,“unique”:“until_and_while_executing”,“dead”:false,“jid”:“34af4c0f4100961968d5a986”,“created_at”:1622642509.2852948,“lock_timeout”:0,“lock_expiration”:null,“unique_prefix”:“uniquejobs”,“unique_args”:[{“klass”:“ClassroomsSynchronizer”,“synchronization_id”:1,“worker_batch_id”:1,“entity_id”:1,“year”:“2020”,“unity_api_code”:“3”,“filtered_by_year”:true,“filtered_by_unity”:true,“current_years”:true,“worker_state_id”:42}],“unique_digest”:“uniquejobs:51cfc8a4468b0f47e134396b993a1726:RUN”,“enqueued_at”:1622642546.140011,“error_message”:“500 Internal Server Error”,“error_class”:“IeducarApi::Base::ApiError”,“failed_at”:1622642523.2878203,“retry_count”:1,“retried_at”:1622642546.340812},“jobstr”:“{"class":"SynchronizerExecuterWorker","args":[{"klass":"ClassroomsSynchronizer","synchronization_id":1,"worker_batch_id":1,"entity_id":1,"year":"2020","unity_api_code":"3","filtered_by_year":true,"filtered_by_unity":true,"current_years":true,"worker_state_id":42}],"retry":3,"queue":"synchronizer","unique":"until_and_while_executing","dead":false,"jid":"34af4c0f4100961968d5a986","created_at":1622642509.2852948,"lock_timeout":0,"lock_expiration":null,"unique_prefix":"uniquejobs","unique_args":[{"klass":"ClassroomsSynchronizer","synchronization_id":1,"worker_batch_id":1,"entity_id":1,"year":"2020","unity_api_code":"3","filtered_by_year":true,"filtered_by_unity":true,"current_years":true,"worker_state_id":42}],"unique_digest":"uniquejobs:51cfc8a4468b0f47e134396b993a1726","enqueued_at":1622642546.140011,"error_message":"could not obtain a database connection within 5.000 seconds (waited 5.002 seconds)","error_class":"ActiveRecord::ConnectionTimeoutError","failed_at":1622642523.2878203,"retry_count":0}”}
2021-06-02T14:02:26.345Z 54937 TID-oulw16fc4 WARN: IeducarApi::Base::ApiError: 500 Internal Server Error
2021-06-02T14:02:26.345Z 54937 TID-oulw16fc4 WARN: /var/www/i-diario/app/services/ieducar_api/base.rb:103:inrescue in request' /var/www/i-diario/app/services/ieducar_api/base.rb:89:in
request’
/var/www/i-diario/app/services/ieducar_api/base.rb:34:infetch' /var/www/i-diario/app/services/ieducar_api/classrooms.rb:12:in
fetch’
/var/www/i-diario/app/services/ieducar_synchronizers/classrooms_synchronizer.rb:5:insynchronize!' /var/www/i-diario/app/services/ieducar_synchronizers/base_synchronizer.rb:19:in
synchronize!’
/var/www/i-diario/app/workers/ieducar/synchronizer_executer_worker.rb:9:inblock in perform' /usr/local/rvm/gems/ruby-2.4.10/bundler/gems/activerecord-connections-b2a704ff10c4/lib/active_record/connections.rb:32:in
using_connection’
/var/www/i-diario/app/models/entity.rb:22:inusing_connection' /var/www/i-diario/app/workers/ieducar/synchronizer_executer_worker.rb:5:in
perform’
/usr/local/rvm/gems/ruby-2.4.10/gems/sidekiq-5.0.3/lib/sidekiq/processor.rb:199:inexecute_job' /usr/local/rvm/gems/ruby-2.4.10/gems/sidekiq-5.0.3/lib/sidekiq/processor.rb:170:in
block (2 levels) in process’
/usr/local/rvm/gems/ruby-2.4.10/gems/sidekiq-5.0.3/lib/sidekiq/middleware/chain.rb:128:inblock in invoke' /usr/local/rvm/gems/ruby-2.4.10/gems/sidekiq-5.0.3/lib/sidekiq/middleware/server/active_record.rb:15:in
call’
/usr/local/rvm/gems/ruby-2.4.10/gems/sidekiq-5.0.3/lib/sidekiq/middleware/chain.rb:130:inblock in invoke' /usr/local/rvm/gems/ruby-2.4.10/gems/sidekiq-unique-jobs-6.0.22/lib/sidekiq_unique_jobs/server/middleware.rb:34:in
block (2 levels) in call’
/usr/local/rvm/gems/ruby-2.4.10/gems/sidekiq-unique-jobs-6.0.22/lib/sidekiq_unique_jobs/lock/until_and_while_executing.rb:21:inblock (2 levels) in execute' /usr/local/rvm/gems/ruby-2.4.10/gems/sidekiq-unique-jobs-6.0.22/lib/sidekiq_unique_jobs/lock/while_executing.rb:38:in
execute’
/usr/local/rvm/gems/ruby-2.4.10/gems/sidekiq-unique-jobs-6.0.22/lib/sidekiq_unique_jobs/lock/until_and_while_executing.rb:21:inblock in execute' /usr/local/rvm/gems/ruby-2.4.10/gems/sidekiq-unique-jobs-6.0.22/lib/sidekiq_unique_jobs/lock/until_and_while_executing.rb:37:in
lock_on_failure’
/usr/local/rvm/gems/ruby-2.4.10/gems/sidekiq-unique-jobs-6.0.22/lib/sidekiq_unique_jobs/lock/until_and_while_executing.rb:20:inexecute' /usr/local/rvm/gems/ruby-2.4.10/gems/sidekiq-unique-jobs-6.0.22/lib/sidekiq_unique_jobs/server/middleware.rb:33:in
block in call’