Skip to content

Instantly share code, notes, and snippets.

View danielnc's full-sized avatar

Daniel Naves de Carvalho danielnc

View GitHub Profile
^C2016-08-24T19:04:13.959Z 45813 TID-ovq1ck45c INFO: Shutting down
2016-08-24T19:04:13.959Z 45813 TID-ovq1ck45c INFO: Terminating quiet workers
2016-08-24T19:04:13.959Z 45813 TID-ovq27tw6s INFO: Scheduler exiting...
2016-08-24T19:04:13.960Z 45813 TID-ovq2au8t0 INFO: Leader stepping down
2016-08-24T19:04:14.060Z 45813 TID-ovq1ck45c INFO: Pausing to allow workers to finish...
2016-08-24T19:04:21.893Z 45813 TID-ovq1ck45c WARN: Terminating 25 busy worker threads
2016-08-24T19:04:21.894Z 45813 TID-ovq1ck45c WARN: Work still in progress [#<struct Sidekiq::Pro::TimedFetch::UnitOfWork queue="queue:default", job="{\"class\":\"Jobs::PatientsJob\",\"args\":[\"a\"],\"retry\":true,\"queue\":\"default\",\"backtrace\":true,\"jid\":\"1ea1a16c0b4898a5bd67bece\",\"created_at\":1472058670.974536,\"enqueued_at\":1472058670.974584}">, #<struct Sidekiq::Pro::TimedFetch::UnitOfWork queue="queue:default", job="{\"class\":\"Jobs::PatientsJob\",\"args\":[\"a\"],\"retry\":true,\"queue\":\"default\",\"backtrace\":true,\"jid\":\"205d9
class Jobs::PatientsJob
include Sidekiq::Worker
def perform(name)
Patient.create(first_name: name, provider: Provider.order(:id).first, user: Provider.order(:id).first.users.first)
puts Patient.count
puts Provider.order("id desc").last.patients.count
end
end