{"id":20492045,"url":"https://github.com/zotonic/buffalo","last_synced_at":"2025-04-13T17:01:49.433Z","repository":{"id":3397689,"uuid":"4447076","full_name":"zotonic/buffalo","owner":"zotonic","description":"🐃 Deduplicating delayed / debounced erlang apply","archived":false,"fork":false,"pushed_at":"2022-05-31T06:48:21.000Z","size":72,"stargazers_count":8,"open_issues_count":1,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-19T14:55:02.423Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zotonic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-05-25T15:39:33.000Z","updated_at":"2022-05-17T19:39:43.000Z","dependencies_parsed_at":"2022-08-03T16:00:19.531Z","dependency_job_id":null,"html_url":"https://github.com/zotonic/buffalo","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zotonic%2Fbuffalo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zotonic%2Fbuffalo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zotonic%2Fbuffalo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zotonic%2Fbuffalo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zotonic","download_url":"https://codeload.github.com/zotonic/buffalo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224819029,"owners_count":17375203,"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-15T17:27:23.894Z","updated_at":"2024-11-15T17:27:24.878Z","avatar_url":"https://github.com/zotonic.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Test](https://github.com/zotonic/buffalo/workflows/Test/badge.svg)\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg?logo=apache\u0026logoColor=red)](https://www.apache.org/licenses/LICENSE-2.0)\n\nBuffalo\n=======\n\nAn Erlang app for delayed process execution.\n\n    buffalo:start().\n    buffalo:queue({Module, Function, Args}, #{ timeout =\u003e Delay }).\n\nWill call the MFA after `Delay` milliseconds. When calling queue/2\nwith the same MFA arguments again without the first one being executed\nyet, the execution of the first one is cancelled and it will take\nagain `Delay` ms. for the MFA to be called.\n\nFor guaranteed execution, the MFA is called within a worker gen_server\nas part of the `buffalo_worker_sup` supervisor.\n\nTimeout\n-------\n\nThe default timeout is 500 msec.\n\nDeadline\n--------\n\nThe MFA is guaranteed to be executed at a defined deadline. The default\ndeadline is 5 times the given timeout (defaults to 2500 msec).\n\nA specific deadline can be specified:\n\n    buffalo:queue({Module, Function, Args}, #{ timeout =\u003e 100, deadline =\u003e 250 }).\n\nDrop If Running\n---------------\n\nNormally entries are dedepulicated when they are queued. With the option `is_drop_running`\nthe task is also not added if the task is already running.\n\nExample:\n\n    buffalo:queue({Module, Function, Args}, #{ is_drop_running =\u003e true }).\n\n\nUnique Key\n----------\n\nNormally the tasks are deduplicated by matching on the complete MFA. It is possible\nto supply an identifying key instead. This makes it possible to update the MFA associated\nwith the key.\n\n    buffalo:queue(Key, MFA, #{ timeout =\u003e 50, deadline =\u003e 400 }).\n\n## Testing\n\n### Testing specification\n\n```\n\t$ rebar3 as test shell\n\t\u003e application:start(buffalo).\n\t\u003e proper:check_specs(buffalo).\n\t\u003e application:stop(buffalo).\n```\t\n\n## Documentation generation\n\n### Edoc\n\n#### Generate public API\n`rebar3 edoc`\n\n#### Generate private API\n`rebar3 as edoc_private edoc`\n\n### ExDoc\n\n`rebar3 ex_doc --logo doc/img/logo.png --output edoc`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzotonic%2Fbuffalo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzotonic%2Fbuffalo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzotonic%2Fbuffalo/lists"}