{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":123466306,"defaultBranch":"master","name":"que","ownerLogin":"bambooengineering","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2018-03-01T17:08:18.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/1116292?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1721819646.0","currentOid":""},"activityList":{"items":[{"before":"feade9c65f9c04d230272043269eda8e2db41e7c","after":"7a6a30ce244f735da4acdf145c8e3f426b4c718a","ref":"refs/heads/master","pushedAt":"2024-07-24T11:19:41.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"owst","name":"Owen Stephens","path":"/owst","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/117234?s=80&v=4"},"commit":{"message":"Merge branch 'pull_428'\n\nCherry pick PR https://github.com/que-rb/que/pull/428","shortMessageHtmlLink":"Merge branch 'pull_428'"}},{"before":"170e954e690a5052a744be493bd8f43bd9cf10b4","after":"feade9c65f9c04d230272043269eda8e2db41e7c","ref":"refs/heads/master","pushedAt":"2024-07-24T11:19:00.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"owst","name":"Owen Stephens","path":"/owst","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/117234?s=80&v=4"},"commit":{"message":"Bump version to 2.4.0","shortMessageHtmlLink":"Bump version to 2.4.0"}},{"before":"5e2dd12dc098bbccb7ebcbf6b84f869a88451278","after":"170e954e690a5052a744be493bd8f43bd9cf10b4","ref":"refs/heads/master","pushedAt":"2024-07-24T11:17:49.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"owst","name":"Owen Stephens","path":"/owst","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/117234?s=80&v=4"},"commit":{"message":"Merge branch 'reinstate_job_details_in_logs'","shortMessageHtmlLink":"Merge branch 'reinstate_job_details_in_logs'"}},{"before":"ae212809f93484383286a19bcc1a4b2769280e9d","after":"7bf4ff5c7b2ec97e2d2c0e21d32af95bd4fe2d6d","ref":"refs/heads/reinstate_job_details_in_logs","pushedAt":"2024-07-24T11:17:34.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"owst","name":"Owen Stephens","path":"/owst","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/117234?s=80&v=4"},"commit":{"message":"Log full job details rather than just job_id\n\nA partial revert of https://github.com/que-rb/que/commit/c43eb24aebcc5054c299cfed00690fce9add36ac which didn't include any reasoning/justification for the log simplification.\n\nIt's useful to be able to log details of the job, particularly the job_class and arguments; if this additional detail isn't desired then it can be removed by using a custom `Que.log_formatter`, for example:\n\n```ruby\nQue.log_formatter = proc do |data|\n if (job = data.delete(:job))\n data[:job_id] = job[:id]\n end\n\n JSON.dump(data)\nend\n```","shortMessageHtmlLink":"Log full job details rather than just job_id"}},{"before":"9ee74dbf8fa5eb814535df12893a3ce65582c337","after":"5e2dd12dc098bbccb7ebcbf6b84f869a88451278","ref":"refs/heads/master","pushedAt":"2024-07-24T11:16:31.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"owst","name":"Owen Stephens","path":"/owst","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/117234?s=80&v=4"},"commit":{"message":"Merge branch 'reinstate_job_details_in_logs'","shortMessageHtmlLink":"Merge branch 'reinstate_job_details_in_logs'"}},{"before":"9ee74dbf8fa5eb814535df12893a3ce65582c337","after":"ae212809f93484383286a19bcc1a4b2769280e9d","ref":"refs/heads/reinstate_job_details_in_logs","pushedAt":"2024-07-24T11:16:05.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"owst","name":"Owen Stephens","path":"/owst","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/117234?s=80&v=4"},"commit":{"message":"Log full job details rather than just job_id\n\nA partial revert of https://github.com/bambooengineering/que/commit/c43eb24aebcc5054c299cfed00690fce9add36ac which didn't include any reasoning/justification for the log simplicifcation.\n\nIt's useful to be able to log details of the job, particularly the job_class and arguments; if this additional detail isn't desired then it can be removed by using a custom `Que.log_formatter`, for example:\n\n```ruby\nQue.log_formatter = proc do |data|\n if (job = data.delete(:job))\n data[:job_id] = job[:id]\n end\n\n JSON.dump(data)\nend\n```","shortMessageHtmlLink":"Log full job details rather than just job_id"}},{"before":"feade9c65f9c04d230272043269eda8e2db41e7c","after":"9ee74dbf8fa5eb814535df12893a3ce65582c337","ref":"refs/heads/master","pushedAt":"2024-07-24T11:14:57.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"owst","name":"Owen Stephens","path":"/owst","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/117234?s=80&v=4"},"commit":{"message":"Log full job details rather than just job_id\n\nA partial revert of https://github.com/bambooengineering/que/commit/c43eb24aebcc5054c299cfed00690fce9add36ac which didn't include any reasoning/justification for the log simplicifcation.\n\nIt's useful to be able to log details of the job, particularly the job_class and arguments; if this additional detail isn't desired then it can be removed by using a custom `Que.log_formatter`, for example:\n\n```ruby\nQue.log_formatter = proc do |data|\n if (job = data.delete(:job))\n data[:job_id] = job[:id]\n end\n\n JSON.dump(data)\nend\n```","shortMessageHtmlLink":"Log full job details rather than just job_id"}},{"before":null,"after":"9ee74dbf8fa5eb814535df12893a3ce65582c337","ref":"refs/heads/reinstate_job_details_in_logs","pushedAt":"2024-07-24T11:14:06.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"owst","name":"Owen Stephens","path":"/owst","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/117234?s=80&v=4"},"commit":{"message":"Log full job details rather than just job_id\n\nA partial revert of https://github.com/bambooengineering/que/commit/c43eb24aebcc5054c299cfed00690fce9add36ac which didn't include any reasoning/justification for the log simplicifcation.\n\nIt's useful to be able to log details of the job, particularly the job_class and arguments; if this additional detail isn't desired then it can be removed by using a custom `Que.log_formatter`, for example:\n\n```ruby\nQue.log_formatter = proc do |data|\n if (job = data.delete(:job))\n data[:job_id] = job[:id]\n end\n\n JSON.dump(data)\nend\n```","shortMessageHtmlLink":"Log full job details rather than just job_id"}},{"before":"2857ab7e24f88b92c1db3ed51fe69f2e8e2e2f8b","after":"feade9c65f9c04d230272043269eda8e2db41e7c","ref":"refs/heads/master","pushedAt":"2024-07-12T11:10:38.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"owst","name":"Owen Stephens","path":"/owst","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/117234?s=80&v=4"},"commit":{"message":"Bump version to 2.4.0","shortMessageHtmlLink":"Bump version to 2.4.0"}},{"before":"80d6067861a41766c3adb7e29b230ce93d94c8a4","after":"2857ab7e24f88b92c1db3ed51fe69f2e8e2e2f8b","ref":"refs/heads/master","pushedAt":"2024-07-12T11:09:47.000Z","pushType":"push","commitsCount":8,"pusher":{"login":"owst","name":"Owen Stephens","path":"/owst","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/117234?s=80&v=4"},"commit":{"message":"Merge branch 'pull_412'\n\nCherry pick PR https://github.com/que-rb/que/pull/412","shortMessageHtmlLink":"Merge branch 'pull_412'"}},{"before":"fb9278e728b6aca688b3ec8f5b340042a4942062","after":"80d6067861a41766c3adb7e29b230ce93d94c8a4","ref":"refs/heads/master","pushedAt":"2024-07-12T11:02:33.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"owst","name":"Owen Stephens","path":"/owst","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/117234?s=80&v=4"},"commit":{"message":"Merge pull request #418 from kortirso/introduce-que-view-in-readme\n\nupdate readme with link to Que::View","shortMessageHtmlLink":"Merge pull request que-rb#418 from kortirso/introduce-que-view-in-readme"}},{"before":null,"after":"80b615c70afeac2aeec80e6a741f6adfb44e6848","ref":"refs/heads/change-run-at-default-to-clock-timestamp","pushedAt":"2023-12-11T13:43:11.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"hlascelles","name":"Harry Lascelles","path":"/hlascelles","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/299102?s=80&v=4"},"commit":{"message":"Change run_at default to clock_timestamp()\n\n## Problem\n\nJobs enqueued in transactions can appear delayed as the default `run_at` is `now()`, which is a delayed time in a long transaction.\n\n## Example\n\nWe know that the `que_jobs` table has this column: `run_at timestamp with time zone DEFAULT now() NOT NULL,`\n\nWe have some jobs that perform work, and enqueue another job. eg:\n\n```ruby\nclass CalculateBilling < Que::Job\n def run(ref)\n ActiveRecord::Base.transaction do\n calculate_stuff(ref) # Takes 30 seconds\n SendBillingSms.enqueue(ref)\n end\n end\nend\n```\n\nWe then also have an alarm to check our jobs are running in a timely fashion by comparing when the job started with its `run_at`.\n\nIn the scenario above, this means the `SendBillingSms` job is enqueued with `run_at` as `now()`. But, `now()` does not mean \"the time on the wall\" in postgres. It means \"the time the transaction started\".\n\nSee: https://newcubator.com/blog/web/postgresql-timestamp-methods\n\n_Both now() and clock_timestamp() are PostgreSQL functions. The main difference between them is that now() adds the time at the start of the transactions, while clock_timestamp() inserts the time at the execution of the statement._\n\nThis means all of our `SendBillingSms` jobs are instantaneously \"30 seconds delayed\", even if they are run the split second that they are visible to workers.\n\n## Solution\n\nWe could/should change the column to have a default of `clock_timestamp()`.\n\nie: `run_at timestamp with time zone DEFAULT clock_timestamp() NOT NULL,`\n\nThis means that the intent of what the `run_at` of a job \"to run now\" should be is more accurate (probably, ie principle of least surprise). It also means jobs can be monitored for \"delayed start\" more easily and accurately.\n\nNote, we do not want to use Ruby time in a `run_at` as it may be out, even by a second or two. We also would not like to pass a `run_at` in since:\n\n1. We'd have to do it everywhere, or monkeypatch que\n2. We'd have to do a DB lookup for what that time is, which is an extra call","shortMessageHtmlLink":"Change run_at default to clock_timestamp()"}},{"before":"fb94321b40f763fb48db1a63f0c1084bee961388","after":"fb9278e728b6aca688b3ec8f5b340042a4942062","ref":"refs/heads/master","pushedAt":"2023-12-11T13:40:05.000Z","pushType":"push","commitsCount":328,"pusher":{"login":"hlascelles","name":"Harry Lascelles","path":"/hlascelles","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/299102?s=80&v=4"},"commit":{"message":"Merge pull request #408 from que-rb/revert-405-fix-build\n\nRevert \"Temporarily restict rails version to 7.1.0 for 7.1 tests\"","shortMessageHtmlLink":"Merge pull request que-rb#408 from que-rb/revert-405-fix-build"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"startCursor":"Y3Vyc29yOnYyOpK7MjAyNC0wNy0yNFQxMToxOTo0MS4wMDAwMDBazwAAAASH2bto","endCursor":"Y3Vyc29yOnYyOpK7MjAyMy0xMi0xMVQxMzo0MDowNS4wMDAwMDBazwAAAAPHSFjj"}},"title":"Activity ยท bambooengineering/que"}