Skip to content

Instantly share code, notes, and snippets.

@danhawkins
Last active November 30, 2016 07:12
Show Gist options
  • Save danhawkins/d0e192644a082bed12d02a7958cc565b to your computer and use it in GitHub Desktop.
Save danhawkins/d0e192644a082bed12d02a7958cc565b to your computer and use it in GitHub Desktop.
Job.current.map{|j| j.update(courier_id: nil, state:'pending_assignment', submitted_at: Time.now() + rand(1..100).minutes, pending_confirmation_courier_id: nil)}
Job::Pickup.joins(:job).merge(Job.current).update_all(state: 'pending', ordering_state: 'inactive')
User.courier.working_or_active.map{|c| TrackingLocation::RedisPublisher.new(c.last_location).call}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment