Rails 中的批量用户创建 - 很好地利用delayed_job?

发布于 2024-08-08 22:24:54 字数 79 浏览 3 评论 0原文

在我的 Rails 应用程序的管理面板中,我希望管理员能够一次创建多个用户(数百个范围内)。这对于delayed_job来说是一个很好的用途吗?

In the administration panel for my rails application I want to give the administrator the ability to create several users at one time (in the hundreds range). Would this be a good use for delayed_job?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

小女人ら 2024-08-15 22:24:54

是的。

这里是我用来确定是否应该使用延迟作业的标准:

  1. 这是否是一项时间密集型任务?
  2. 这是一个时间敏感的任务吗?
  3. 它会阻止用户使用该应用程序直到它完成吗?
  4. 可以轻松实现自动化吗?

如果我的答案是“是”、“否”、“否”、“是”,那么我会使用延迟的工作。你的情况符合我的标准。

Yes.

Here the criteria I use to determine if a delayed job should be used or not:

  1. Can this be a time intensive task?
  2. Is it a time sensitive task?
  3. Is it going to block the user from using the application until it finishes?
  4. Can it be automated easily?

If my answers were Yes, No, No, Yes, then I would use a delayed job. Your situation meets my criteria.

白衬杉格子梦 2024-08-15 22:24:54

我想不需要立即创建用户。如果他们在接下来的 5 分钟内出现,那就没问题。
那么是的,这适用于延迟工作。

I guess the users don't need to be created right away. If they are within the next 5 minutes, it's ok.
Then yeah, this is applicable with delayed job.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文