{"id":18841631,"url":"https://github.com/alphasights/sneakers_toolbox","last_synced_at":"2026-01-30T12:30:12.865Z","repository":{"id":42480086,"uuid":"154454655","full_name":"alphasights/sneakers_toolbox","owner":"alphasights","description":"Various helpers and convenience classes/modules/methods to help simplify working with Sneakers and get around common issues","archived":false,"fork":false,"pushed_at":"2022-07-05T14:50:22.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":29,"default_branch":"master","last_synced_at":"2024-12-30T10:44:23.753Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alphasights.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-24T07:05:28.000Z","updated_at":"2022-07-05T14:36:42.000Z","dependencies_parsed_at":"2022-09-14T18:00:53.861Z","dependency_job_id":null,"html_url":"https://github.com/alphasights/sneakers_toolbox","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphasights%2Fsneakers_toolbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphasights%2Fsneakers_toolbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphasights%2Fsneakers_toolbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphasights%2Fsneakers_toolbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alphasights","download_url":"https://codeload.github.com/alphasights/sneakers_toolbox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239780122,"owners_count":19695734,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T02:52:02.156Z","updated_at":"2025-02-20T04:42:24.061Z","avatar_url":"https://github.com/alphasights.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SneakersToolbox\n\nVarious helpers and convenience classes/modules/methods to help simplify working with Sneakers and get around common issues\n\n## Components\n\n### LostDbConnectionHandler\n\nSometimes ActiveRecord can lose connection and not be aware of it (thus not re-connecting). It can happen for example when connecting through a QuotaGuard tunnel. This results in `ActiveRecord::StatementInvalid` exception being thrown. `SneakersToolbox::LostDbConnectionHandler` uses this fact to clear all connections, forcing them to be reestablished. You can use this functionality with:\n\n```ruby\n  def work(*args)\n    payload, *extra = args\n    payload = JSON.parse(payload) unless payload.class == Hash\n    SneakersToolbox::LostDbConnectionHandler.with_connection { process_message(payload, *extra) }\n  rescue =\u003e error\n    Honeybadger.notify(error, context: payload)\n    raise error\n  end\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falphasights%2Fsneakers_toolbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falphasights%2Fsneakers_toolbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falphasights%2Fsneakers_toolbox/lists"}